streamlit-nightly 1.45.1.dev20250508__py3-none-any.whl → 1.45.1.dev20250510__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/execution_control.py +1 -1
- streamlit/commands/logo.py +2 -2
- streamlit/commands/navigation.py +6 -5
- 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 +9 -9
- streamlit/config_option.py +2 -2
- 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 +3 -3
- streamlit/deprecation_util.py +1 -1
- streamlit/elements/arrow.py +4 -5
- streamlit/elements/code.py +1 -1
- 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 +38 -40
- streamlit/elements/lib/color_util.py +3 -3
- streamlit/elements/lib/column_types.py +4 -4
- streamlit/elements/lib/dialog.py +2 -2
- streamlit/elements/lib/event_utils.py +1 -1
- streamlit/elements/lib/image_utils.py +1 -1
- streamlit/elements/lib/mutable_status_container.py +1 -1
- streamlit/elements/lib/options_selector_utils.py +2 -2
- streamlit/elements/lib/policies.py +3 -3
- streamlit/elements/lib/utils.py +5 -5
- streamlit/elements/metric.py +1 -1
- streamlit/elements/progress.py +9 -12
- streamlit/elements/vega_charts.py +3 -3
- streamlit/elements/widgets/audio_input.py +1 -1
- streamlit/elements/widgets/button.py +1 -1
- streamlit/elements/widgets/button_group.py +4 -4
- streamlit/elements/widgets/camera_input.py +1 -1
- streamlit/elements/widgets/checkbox.py +2 -2
- streamlit/elements/widgets/color_picker.py +1 -1
- streamlit/elements/widgets/data_editor.py +3 -3
- streamlit/elements/widgets/file_uploader.py +1 -1
- streamlit/elements/widgets/multiselect.py +3 -3
- streamlit/elements/widgets/number_input.py +2 -2
- streamlit/elements/widgets/radio.py +1 -1
- streamlit/elements/widgets/select_slider.py +1 -1
- streamlit/elements/widgets/selectbox.py +2 -2
- streamlit/elements/widgets/slider.py +19 -17
- streamlit/elements/widgets/text_widgets.py +2 -2
- streamlit/elements/widgets/time_widgets.py +2 -2
- 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 +2 -2
- 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/DataFrame_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/NamedDataSet_pb2.pyi +1 -1
- 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 +15 -15
- 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/query_params_proxy.py +1 -1
- 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.C9UoaGEN.js → ErrorOutline.esm.BewaDzzJ.js} +1 -1
- streamlit/static/static/js/{FileDownload.esm.DoToR9q0.js → FileDownload.esm.D6ilL7v-.js} +1 -1
- streamlit/static/static/js/{FileHelper.Bt4VJ--Q.js → FileHelper.q7erXtkb.js} +1 -1
- streamlit/static/static/js/{FormClearHelper.D5PbW8FI.js → FormClearHelper.Dd0v0IXt.js} +1 -1
- streamlit/static/static/js/{Hooks.DgkQ2Xp9.js → Hooks.CchmJZGs.js} +1 -1
- streamlit/static/static/js/{InputInstructions.DLnLhwHI.js → InputInstructions.DI9h4PJ7.js} +1 -1
- streamlit/static/static/js/{ProgressBar.BtSgh_K-.js → ProgressBar.DfcVR_JA.js} +1 -1
- streamlit/static/static/js/{RenderInPortalIfExists.CjdyBvQX.js → RenderInPortalIfExists.BAkT-LV5.js} +1 -1
- streamlit/static/static/js/{Toolbar.CAYIzVZk.js → Toolbar.CNzefYiX.js} +1 -1
- streamlit/static/static/js/{base-input.CD4xW4_9.js → base-input.BmA1ZV9Y.js} +1 -1
- streamlit/static/static/js/{checkbox.Ba4jj5dR.js → checkbox.mT4TKcAG.js} +1 -1
- streamlit/static/static/js/{createSuper.BBGT9Ijd.js → createSuper.Duo43uhY.js} +1 -1
- streamlit/static/static/js/{data-grid-overlay-editor.CYuk1Aj7.js → data-grid-overlay-editor.CY3l_gmP.js} +1 -1
- streamlit/static/static/js/{downloader.DM9KEOCw.js → downloader.CM5asV91.js} +1 -1
- streamlit/static/static/js/{es6.FqM62T4b.js → es6.uiOeU51e.js} +2 -2
- streamlit/static/static/js/{iframeResizer.contentWindow.s2B09mw2.js → iframeResizer.contentWindow.ClkMmI3q.js} +1 -1
- streamlit/static/static/js/{index.Cwtbhfaf.js → index.1tDlzcmX.js} +1 -1
- streamlit/static/static/js/index.3d64wPzr.js +1 -0
- streamlit/static/static/js/{index.DQi04JYE.js → index.B-oXGsp7.js} +1 -1
- streamlit/static/static/js/{index.0pkoyBcb.js → index.B2EfQ-qM.js} +1 -1
- streamlit/static/static/js/{index.DkGCnTMe.js → index.B5wTpdet.js} +1 -1
- streamlit/static/static/js/{index.DG8IxVeM.js → index.B6y8ns6u.js} +2 -2
- streamlit/static/static/js/{index.B9FiDQ3U.js → index.BArkjssT.js} +1 -1
- streamlit/static/static/js/{index.CpDFZQ4Y.js → index.BPK3aPVr.js} +1 -1
- streamlit/static/static/js/index.BWubePhz.js +1 -0
- streamlit/static/static/js/{index.T5LKPcND.js → index.BmBUBll0.js} +1 -1
- streamlit/static/static/js/{index.BMXmhMlZ.js → index.BnmoQ0mJ.js} +1 -1
- streamlit/static/static/js/{index.BsjuUMyW.js → index.C1_voZpt.js} +1 -1
- streamlit/static/static/js/index.C6tuB1Tp.js +2 -0
- streamlit/static/static/js/{index.BoMRR3tN.js → index.CB8SwV8L.js} +1 -1
- streamlit/static/static/js/{index.CEKMSkSh.js → index.CXmZFP__.js} +36 -36
- streamlit/static/static/js/{index.DTi8Lw0k.js → index.CYAmxIg2.js} +1 -1
- streamlit/static/static/js/{index.DMrO9G6A.js → index.D-zMZsin.js} +1 -1
- streamlit/static/static/js/{index.JTeVe9GQ.js → index.D56z-_rt.js} +1 -1
- streamlit/static/static/js/index.D6AKDy4z.js +1 -0
- streamlit/static/static/js/{index.BFqpCk2P.js → index.D9lEoddJ.js} +1 -1
- streamlit/static/static/js/index.DAEzs_UL.js +1 -0
- streamlit/static/static/js/{index.BDTYk2an.js → index.DLO5_tVd.js} +1 -1
- streamlit/static/static/js/{index.BY7-qCf5.js → index.DLyB6OQM.js} +1 -1
- streamlit/static/static/js/index.DNWXtL99.js +1 -0
- streamlit/static/static/js/index.DbgE46VI.js +1 -0
- streamlit/static/static/js/{index.b9kK7Vzl.js → index.DeLPvnoy.js} +1 -1
- streamlit/static/static/js/{index.CH9XN_-G.js → index.DeeFVG0Y.js} +2 -2
- streamlit/static/static/js/{index.BVA8TXNT.js → index.Dhu_cVNQ.js} +1 -1
- streamlit/static/static/js/{index.R0peMEpV.js → index.Dj8nqcpI.js} +1 -1
- streamlit/static/static/js/{index.D9FvPPrI.js → index.DpWg6flp.js} +1 -1
- streamlit/static/static/js/{index.CeiCniCg.js → index.IqYlA3jn.js} +1 -1
- streamlit/static/static/js/{index.DSDkXosb.js → index.JA6OF_5t.js} +2 -2
- streamlit/static/static/js/{index.C2qCX1Lh.js → index.PoIwzrI7.js} +151 -151
- streamlit/static/static/js/{index.CqaahZPf.js → index.SW3uv22k.js} +1 -1
- streamlit/static/static/js/{index.DWaB7Scf.js → index.WlA_Ju7i.js} +1 -1
- streamlit/static/static/js/{index.CP2PmB93.js → index.blwBIOHe.js} +1 -1
- streamlit/static/static/js/{index.CyE1OdOj.js → index.wiodyGjO.js} +1 -1
- streamlit/static/static/js/{input.DMOGBelK.js → input.B3uNJm6d.js} +1 -1
- streamlit/static/static/js/{memory.DmCktBGW.js → memory.BWtwV556.js} +1 -1
- streamlit/static/static/js/{mergeWith.DeWTsJ5h.js → mergeWith.BeTmYGS_.js} +1 -1
- streamlit/static/static/js/{number-overlay-editor.DDFelcUP.js → number-overlay-editor.MW9-6kFx.js} +1 -1
- streamlit/static/static/js/{possibleConstructorReturn.CYJtAqB-.js → possibleConstructorReturn.ZgHiGHSO.js} +1 -1
- streamlit/static/static/js/{sandbox.CfaU9Ih9.js → sandbox.BZyTt4zT.js} +1 -1
- streamlit/static/static/js/{textarea.7hWYKDw2.js → textarea.CgvEg9Xi.js} +1 -1
- streamlit/static/static/js/{timepicker.DZsgZ9oE.js → timepicker.CHPC9KOb.js} +1 -1
- streamlit/static/static/js/{toConsumableArray.CqWB4Jry.js → toConsumableArray.6GvveewD.js} +1 -1
- streamlit/static/static/js/{uniqueId.DQ533D9O.js → uniqueId.BV5h1uCx.js} +1 -1
- streamlit/static/static/js/{useBasicWidgetState.-99xbU_o.js → useBasicWidgetState.DzE2MsN8.js} +1 -1
- streamlit/static/static/js/{useOnInputChange.B4G2Q7Bu.js → useOnInputChange.sGAnyCSU.js} +1 -1
- streamlit/static/static/js/{withFullScreenWrapper.BJQZ2aNc.js → withFullScreenWrapper.Bh08pTH8.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/vendor/pympler/asizeof.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/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 +2 -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.dev20250508.dist-info → streamlit_nightly-1.45.1.dev20250510.dist-info}/METADATA +1 -1
- {streamlit_nightly-1.45.1.dev20250508.dist-info → streamlit_nightly-1.45.1.dev20250510.dist-info}/RECORD +201 -197
- {streamlit_nightly-1.45.1.dev20250508.dist-info → streamlit_nightly-1.45.1.dev20250510.dist-info}/WHEEL +1 -1
- streamlit/static/static/js/index.CCD4LJ9Q.js +0 -1
- streamlit/static/static/js/index.CbLZDRQu.js +0 -1
- streamlit/static/static/js/index.D9qEk5xd.js +0 -1
- streamlit/static/static/js/index.DTXSsTgK.js +0 -1
- streamlit/static/static/js/index.DqVjOqxm.js +0 -1
- streamlit/static/static/js/index.RHbaxsqm.js +0 -1
- streamlit/static/static/js/index.hT9gkW3a.js +0 -2
- {streamlit_nightly-1.45.1.dev20250508.data → streamlit_nightly-1.45.1.dev20250510.data}/scripts/streamlit.cmd +0 -0
- {streamlit_nightly-1.45.1.dev20250508.dist-info → streamlit_nightly-1.45.1.dev20250510.dist-info}/entry_points.txt +0 -0
- {streamlit_nightly-1.45.1.dev20250508.dist-info → streamlit_nightly-1.45.1.dev20250510.dist-info}/top_level.txt +0 -0
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
@@ -41,7 +41,7 @@ class GitRepo:
|
|
41
41
|
|
42
42
|
# GitPython is not fully typed, and mypy is outputting inconsistent
|
43
43
|
# type errors on Mac and Linux. We bypass type checking entirely
|
44
|
-
# by
|
44
|
+
# by redeclaring the `git` import as an "Any".
|
45
45
|
git_package: Any = git
|
46
46
|
self.repo = git_package.Repo(path, search_parent_directories=True)
|
47
47
|
self.git_version = self.repo.git.version_info
|
@@ -145,7 +145,7 @@ class GitRepo:
|
|
145
145
|
|
146
146
|
return False
|
147
147
|
|
148
|
-
def get_repo_info(self):
|
148
|
+
def get_repo_info(self) -> tuple[str, str, str] | None:
|
149
149
|
if not self.is_valid():
|
150
150
|
return None
|
151
151
|
|
@@ -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
|
@@ -29,7 +29,7 @@ DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
|
|
29
29
|
|
30
30
|
@typing.final
|
31
31
|
class DataFrame(google.protobuf.message.Message):
|
32
|
-
"""DEPRECATED: This proto message is deprecated and
|
32
|
+
"""DEPRECATED: This proto message is deprecated and unused. Use Arrow.proto instead.
|
33
33
|
Represents a pandas DataFrame.
|
34
34
|
"""
|
35
35
|
|
@@ -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)
|
@@ -0,0 +1,70 @@
|
|
1
|
+
"""
|
2
|
+
@generated by mypy-protobuf. Do not edit manually!
|
3
|
+
isort:skip_file
|
4
|
+
*!
|
5
|
+
Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-2025)
|
6
|
+
|
7
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
you may not use this file except in compliance with the License.
|
9
|
+
You may obtain a copy of the License at
|
10
|
+
|
11
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
|
13
|
+
Unless required by applicable law or agreed to in writing, software
|
14
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
See the License for the specific language governing permissions and
|
17
|
+
limitations under the License.
|
18
|
+
"""
|
19
|
+
|
20
|
+
import builtins
|
21
|
+
import google.protobuf.descriptor
|
22
|
+
import google.protobuf.internal.enum_type_wrapper
|
23
|
+
import google.protobuf.message
|
24
|
+
import sys
|
25
|
+
import typing
|
26
|
+
|
27
|
+
if sys.version_info >= (3, 10):
|
28
|
+
import typing as typing_extensions
|
29
|
+
else:
|
30
|
+
import typing_extensions
|
31
|
+
|
32
|
+
DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
|
33
|
+
|
34
|
+
class _GapSize:
|
35
|
+
ValueType = typing.NewType("ValueType", builtins.int)
|
36
|
+
V: typing_extensions.TypeAlias = ValueType
|
37
|
+
|
38
|
+
class _GapSizeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_GapSize.ValueType], builtins.type):
|
39
|
+
DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
|
40
|
+
GAP_UNDEFINED: _GapSize.ValueType # 0
|
41
|
+
SMALL: _GapSize.ValueType # 1
|
42
|
+
MEDIUM: _GapSize.ValueType # 2
|
43
|
+
LARGE: _GapSize.ValueType # 3
|
44
|
+
NONE: _GapSize.ValueType # 4
|
45
|
+
|
46
|
+
class GapSize(_GapSize, metaclass=_GapSizeEnumTypeWrapper): ...
|
47
|
+
|
48
|
+
GAP_UNDEFINED: GapSize.ValueType # 0
|
49
|
+
SMALL: GapSize.ValueType # 1
|
50
|
+
MEDIUM: GapSize.ValueType # 2
|
51
|
+
LARGE: GapSize.ValueType # 3
|
52
|
+
NONE: GapSize.ValueType # 4
|
53
|
+
global___GapSize = GapSize
|
54
|
+
|
55
|
+
@typing.final
|
56
|
+
class GapConfig(google.protobuf.message.Message):
|
57
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
58
|
+
|
59
|
+
GAP_SIZE_FIELD_NUMBER: builtins.int
|
60
|
+
gap_size: global___GapSize.ValueType
|
61
|
+
def __init__(
|
62
|
+
self,
|
63
|
+
*,
|
64
|
+
gap_size: global___GapSize.ValueType = ...,
|
65
|
+
) -> None: ...
|
66
|
+
def HasField(self, field_name: typing.Literal["gap_size", b"gap_size", "gap_spec", b"gap_spec"]) -> builtins.bool: ...
|
67
|
+
def ClearField(self, field_name: typing.Literal["gap_size", b"gap_size", "gap_spec", b"gap_spec"]) -> None: ...
|
68
|
+
def WhichOneof(self, oneof_group: typing.Literal["gap_spec", b"gap_spec"]) -> typing.Literal["gap_size"] | None: ...
|
69
|
+
|
70
|
+
global___GapConfig = GapConfig
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
3
|
+
# source: streamlit/proto/HeightConfig.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\"streamlit/proto/HeightConfig.proto\x12\tstreamlit\"c\n\x0cHeightConfig\x12\x15\n\x0buse_stretch\x18\x01 \x01(\x08H\x00\x12\x15\n\x0buse_content\x18\x02 \x01(\x08H\x00\x12\x16\n\x0cpixel_height\x18\x03 \x01(\rH\x00\x42\r\n\x0bheight_specB1\n\x1c\x63om.snowflake.apps.streamlitB\x11HeightConfigProtob\x06proto3')
|
18
|
+
|
19
|
+
_globals = globals()
|
20
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
21
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'streamlit.proto.HeightConfig_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\021HeightConfigProto'
|
25
|
+
_globals['_HEIGHTCONFIG']._serialized_start=49
|
26
|
+
_globals['_HEIGHTCONFIG']._serialized_end=148
|
27
|
+
# @@protoc_insertion_point(module_scope)
|
@@ -0,0 +1,48 @@
|
|
1
|
+
"""
|
2
|
+
@generated by mypy-protobuf. Do not edit manually!
|
3
|
+
isort:skip_file
|
4
|
+
*!
|
5
|
+
Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-2025)
|
6
|
+
|
7
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
you may not use this file except in compliance with the License.
|
9
|
+
You may obtain a copy of the License at
|
10
|
+
|
11
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
|
13
|
+
Unless required by applicable law or agreed to in writing, software
|
14
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
See the License for the specific language governing permissions and
|
17
|
+
limitations under the License.
|
18
|
+
"""
|
19
|
+
|
20
|
+
import builtins
|
21
|
+
import google.protobuf.descriptor
|
22
|
+
import google.protobuf.message
|
23
|
+
import typing
|
24
|
+
|
25
|
+
DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
|
26
|
+
|
27
|
+
@typing.final
|
28
|
+
class HeightConfig(google.protobuf.message.Message):
|
29
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
30
|
+
|
31
|
+
USE_STRETCH_FIELD_NUMBER: builtins.int
|
32
|
+
USE_CONTENT_FIELD_NUMBER: builtins.int
|
33
|
+
PIXEL_HEIGHT_FIELD_NUMBER: builtins.int
|
34
|
+
use_stretch: builtins.bool
|
35
|
+
use_content: builtins.bool
|
36
|
+
pixel_height: builtins.int
|
37
|
+
def __init__(
|
38
|
+
self,
|
39
|
+
*,
|
40
|
+
use_stretch: builtins.bool = ...,
|
41
|
+
use_content: builtins.bool = ...,
|
42
|
+
pixel_height: builtins.int = ...,
|
43
|
+
) -> None: ...
|
44
|
+
def HasField(self, field_name: typing.Literal["height_spec", b"height_spec", "pixel_height", b"pixel_height", "use_content", b"use_content", "use_stretch", b"use_stretch"]) -> builtins.bool: ...
|
45
|
+
def ClearField(self, field_name: typing.Literal["height_spec", b"height_spec", "pixel_height", b"pixel_height", "use_content", b"use_content", "use_stretch", b"use_stretch"]) -> None: ...
|
46
|
+
def WhichOneof(self, oneof_group: typing.Literal["height_spec", b"height_spec"]) -> typing.Literal["use_stretch", "use_content", "pixel_height"] | None: ...
|
47
|
+
|
48
|
+
global___HeightConfig = HeightConfig
|
@@ -27,7 +27,7 @@ DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
|
|
27
27
|
|
28
28
|
@typing.final
|
29
29
|
class NamedDataSet(google.protobuf.message.Message):
|
30
|
-
"""DEPRECATED: This proto message is deprecated and
|
30
|
+
"""DEPRECATED: This proto message is deprecated and unused.
|
31
31
|
A dataset that can be referenced by name.
|
32
32
|
"""
|
33
33
|
|
@@ -14,14 +14,14 @@ _sym_db = _symbol_database.Default()
|
|
14
14
|
|
15
15
|
|
16
16
|
|
17
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!streamlit/proto/WidthConfig.proto\x12\tstreamlit\"`\n\x0bWidthConfig\x12\x15\n\x0buse_stretch\x18\x01 \x01(\x08H\x00\x12\x15\n\x0buse_content\x18\x02 \x01(\x08H\x00\x12\x15\n\x0bpixel_width\x18\x03 \x01(\rH\x00\x42\x0c\n\
|
17
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!streamlit/proto/WidthConfig.proto\x12\tstreamlit\"`\n\x0bWidthConfig\x12\x15\n\x0buse_stretch\x18\x01 \x01(\x08H\x00\x12\x15\n\x0buse_content\x18\x02 \x01(\x08H\x00\x12\x15\n\x0bpixel_width\x18\x03 \x01(\rH\x00\x42\x0c\n\nwidth_specB0\n\x1c\x63om.snowflake.apps.streamlitB\x10WidthConfigProtob\x06proto3')
|
18
18
|
|
19
19
|
_globals = globals()
|
20
20
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
21
21
|
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'streamlit.proto.WidthConfig_pb2', _globals)
|
22
22
|
if not _descriptor._USE_C_DESCRIPTORS:
|
23
23
|
_globals['DESCRIPTOR']._loaded_options = None
|
24
|
-
_globals['DESCRIPTOR']._serialized_options = b'\n\034com.snowflake.apps.streamlitB\
|
24
|
+
_globals['DESCRIPTOR']._serialized_options = b'\n\034com.snowflake.apps.streamlitB\020WidthConfigProto'
|
25
25
|
_globals['_WIDTHCONFIG']._serialized_start=48
|
26
26
|
_globals['_WIDTHCONFIG']._serialized_end=144
|
27
27
|
# @@protoc_insertion_point(module_scope)
|
@@ -1,7 +1,21 @@
|
|
1
1
|
"""
|
2
2
|
@generated by mypy-protobuf. Do not edit manually!
|
3
3
|
isort:skip_file
|
4
|
-
|
4
|
+
*!
|
5
|
+
Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-2025)
|
6
|
+
|
7
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
you may not use this file except in compliance with the License.
|
9
|
+
You may obtain a copy of the License at
|
10
|
+
|
11
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
|
13
|
+
Unless required by applicable law or agreed to in writing, software
|
14
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
See the License for the specific language governing permissions and
|
17
|
+
limitations under the License.
|
18
|
+
"""
|
5
19
|
|
6
20
|
import builtins
|
7
21
|
import google.protobuf.descriptor
|
streamlit/runtime/app_session.py
CHANGED
@@ -20,7 +20,7 @@ import os
|
|
20
20
|
import sys
|
21
21
|
import uuid
|
22
22
|
from enum import Enum
|
23
|
-
from typing import TYPE_CHECKING, Callable, Final
|
23
|
+
from typing import TYPE_CHECKING, Any, Callable, Final
|
24
24
|
|
25
25
|
from google.protobuf.json_format import ParseDict
|
26
26
|
|
@@ -480,7 +480,7 @@ class AppSession:
|
|
480
480
|
else:
|
481
481
|
self._enqueue_forward_msg(self._create_file_change_message())
|
482
482
|
|
483
|
-
def _on_secrets_file_changed(self, _) -> None:
|
483
|
+
def _on_secrets_file_changed(self, _: Any) -> None:
|
484
484
|
"""Called when `secrets.file_change_listener` emits a Signal."""
|
485
485
|
|
486
486
|
# NOTE: At the time of writing, this function only calls
|
@@ -83,6 +83,10 @@ CachePersistType: TypeAlias = Union[Literal["disk"], None]
|
|
83
83
|
class CachedDataFuncInfo(CachedFuncInfo):
|
84
84
|
"""Implements the CachedFuncInfo interface for @st.cache_data."""
|
85
85
|
|
86
|
+
persist: CachePersistType
|
87
|
+
max_entries: int | None
|
88
|
+
ttl: float | timedelta | str | None
|
89
|
+
|
86
90
|
def __init__(
|
87
91
|
self,
|
88
92
|
func: types.FunctionType,
|
@@ -91,7 +95,7 @@ class CachedDataFuncInfo(CachedFuncInfo):
|
|
91
95
|
max_entries: int | None,
|
92
96
|
ttl: float | timedelta | str | None,
|
93
97
|
hash_funcs: HashFuncsDict | None = None,
|
94
|
-
):
|
98
|
+
) -> None:
|
95
99
|
super().__init__(
|
96
100
|
func,
|
97
101
|
show_spinner=show_spinner,
|
@@ -317,7 +321,7 @@ class CacheDataAPI:
|
|
317
321
|
st.cache_data.clear().
|
318
322
|
"""
|
319
323
|
|
320
|
-
def __init__(self, decorator_metric_name: str):
|
324
|
+
def __init__(self, decorator_metric_name: str) -> None:
|
321
325
|
"""Create a CacheDataAPI instance.
|
322
326
|
|
323
327
|
Parameters
|
@@ -363,7 +367,7 @@ class CacheDataAPI:
|
|
363
367
|
persist: CachePersistType | bool = None,
|
364
368
|
experimental_allow_widgets: bool = False,
|
365
369
|
hash_funcs: HashFuncsDict | None = None,
|
366
|
-
):
|
370
|
+
) -> F | Callable[[F], F]:
|
367
371
|
return self._decorator(
|
368
372
|
func,
|
369
373
|
ttl=ttl,
|
@@ -384,7 +388,7 @@ class CacheDataAPI:
|
|
384
388
|
persist: CachePersistType | bool,
|
385
389
|
experimental_allow_widgets: bool,
|
386
390
|
hash_funcs: HashFuncsDict | None = None,
|
387
|
-
):
|
391
|
+
) -> F | Callable[[F], F]:
|
388
392
|
"""Decorator to cache functions that return data (e.g. dataframe transforms, database queries, ML inference).
|
389
393
|
|
390
394
|
Cached objects are stored in "pickled" form, which means that the return
|
@@ -605,7 +609,7 @@ class DataCache(Cache):
|
|
605
609
|
max_entries: int | None,
|
606
610
|
ttl_seconds: float | None,
|
607
611
|
display_name: str,
|
608
|
-
):
|
612
|
+
) -> None:
|
609
613
|
super().__init__()
|
610
614
|
self.key = key
|
611
615
|
self.display_name = display_name
|