streamlit-nightly 1.42.3.dev20250224__py2.py3-none-any.whl → 1.42.3.dev20250226__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- streamlit/config.py +11 -4
- streamlit/elements/arrow.py +16 -8
- streamlit/elements/widgets/chat.py +99 -17
- streamlit/elements/widgets/data_editor.py +12 -7
- streamlit/elements/widgets/file_uploader.py +20 -10
- streamlit/proto/ClientState_pb2.py +5 -3
- streamlit/proto/ClientState_pb2.pyi +29 -2
- streamlit/proto/NewSession_pb2.py +16 -16
- streamlit/proto/NewSession_pb2.pyi +9 -9
- streamlit/runtime/app_session.py +5 -0
- streamlit/runtime/caching/hashing.py +67 -5
- streamlit/runtime/context.py +19 -0
- streamlit/runtime/scriptrunner/script_runner.py +2 -0
- streamlit/runtime/scriptrunner_utils/script_requests.py +7 -1
- streamlit/runtime/scriptrunner_utils/script_run_context.py +4 -0
- streamlit/static/index.html +1 -1
- streamlit/static/static/js/{FileDownload.esm.Db6P60XC.js → FileDownload.esm.CWn5B5ZN.js} +1 -1
- streamlit/static/static/js/{FileHelper.LHDgAkEu.js → FileHelper.Bii_mi1A.js} +1 -1
- streamlit/static/static/js/{FormClearHelper.BkPbs0OF.js → FormClearHelper.BlCIuWCo.js} +1 -1
- streamlit/static/static/js/{Hooks.CW1Ujj-E.js → Hooks.DURid8_V.js} +1 -1
- streamlit/static/static/js/{InputInstructions.CHpHVupe.js → InputInstructions.gFFpIc6i.js} +1 -1
- streamlit/static/static/js/{ProgressBar.CSZV-k_M.js → ProgressBar.CtXtbXhv.js} +1 -1
- streamlit/static/static/js/{RenderInPortalIfExists.CrI9B0Qh.js → RenderInPortalIfExists.DKWNQmbm.js} +1 -1
- streamlit/static/static/js/{Toolbar.CfNF-56q.js → Toolbar.CKKwksQV.js} +1 -1
- streamlit/static/static/js/{base-input.BBFJwxWO.js → base-input.BUY9TLqO.js} +3 -3
- streamlit/static/static/js/checkbox.C4L_5Z9H.js +9 -0
- streamlit/static/static/js/{createSuper.rz8EjYR0.js → createSuper.DprEKsA6.js} +1 -1
- streamlit/static/static/js/data-grid-overlay-editor.BArvtwSg.js +1 -0
- streamlit/static/static/js/{downloader.DEY2_Oao.js → downloader.C5pxkE2v.js} +1 -1
- streamlit/static/static/js/{es6.Cbt8Qb0v.js → es6.DmKjMqyQ.js} +2 -2
- streamlit/static/static/js/{iframeResizer.contentWindow.DlY1zPt7.js → iframeResizer.contentWindow.DhqbXIl1.js} +1 -1
- streamlit/static/static/js/{index.LmMDdxLh.js → index.B-S4HX7x.js} +1 -1
- streamlit/static/static/js/{index.InwDjRN5.js → index.B-vrwvgD.js} +1 -1
- streamlit/static/static/js/index.BAfr2RC0.js +3865 -0
- streamlit/static/static/js/index.BCErGZwr.js +1 -0
- streamlit/static/static/js/{index.Bv1JbhEf.js → index.BEnZZwfW.js} +1 -1
- streamlit/static/static/js/{index.CUepHEom.js → index.BSczaRDm.js} +1 -1
- streamlit/static/static/js/{index.BtBNIxWC.js → index.BUnWa5Cg.js} +1 -1
- streamlit/static/static/js/{index.BFFhpOhV.js → index.BVHfAEko.js} +1 -1
- streamlit/static/static/js/{index.CIDueoC2.js → index.Bds7Anva.js} +1 -1
- streamlit/static/static/js/index.Bk3A478D.js +197 -0
- streamlit/static/static/js/{index.D2PC_wwi.js → index.BmnSGdtS.js} +1 -1
- streamlit/static/static/js/{index.DPZJrrNj.js → index.BoBCblDb.js} +1 -1
- streamlit/static/static/js/{index.Bhf5i-o4.js → index.C3l2zbST.js} +1 -1
- streamlit/static/static/js/{index.C9kvqGu0.js → index.CTqvpoOz.js} +1 -1
- streamlit/static/static/js/{index.DEz7mrAp.js → index.CXpOPWFV.js} +1 -1
- streamlit/static/static/js/{index.CjN5S59O.js → index.Cd03IYkG.js} +1 -1
- streamlit/static/static/js/{index.C41AtD-D.js → index.ChEJa75P.js} +1 -1
- streamlit/static/static/js/{index.DxvQWdtj.js → index.CoQjULdH.js} +18 -18
- streamlit/static/static/js/{index.I2Ij_yHL.js → index.CvNhwseQ.js} +1 -1
- streamlit/static/static/js/{index.D1sfL1bE.js → index.D2-IYCcZ.js} +1 -1
- streamlit/static/static/js/{index.DuUcgXrv.js → index.D2G24Udm.js} +1 -1
- streamlit/static/static/js/index.DNr2W0gq.js +1 -0
- streamlit/static/static/js/{index.jj20zRA4.js → index.DhcYAj3f.js} +1 -1
- streamlit/static/static/js/{index.BcIDRdbw.js → index.DtIKjlNZ.js} +1 -1
- streamlit/static/static/js/{index.C3FZ8TOb.js → index.EIkP6R_d.js} +2 -2
- streamlit/static/static/js/{index.7HEH_7fJ.js → index.KPwXWqBk.js} +7 -7
- streamlit/static/static/js/index.NKOzzX__.js +1 -0
- streamlit/static/static/js/{index.B5Q1lb1E.js → index.O5-Wn4Yr.js} +1 -1
- streamlit/static/static/js/index.RFfgDsnM.js +2 -0
- streamlit/static/static/js/{index.8pg9ijwI.js → index.RrEbViHi.js} +1 -1
- streamlit/static/static/js/{index.CUFUpykP.js → index.UE_L1IEZ.js} +2 -2
- streamlit/static/static/js/index.WAlW9lgW.js +1 -0
- streamlit/static/static/js/{index.CgZ_3VRU.js → index.c_V1HXTs.js} +1 -1
- streamlit/static/static/js/{index.Df3vkO_v.js → index.doRPQ8od.js} +1 -1
- streamlit/static/static/js/index.oPGa5nFU.js +1 -0
- streamlit/static/static/js/{index.D8mp5ppE.js → index.u1gL_Cm_.js} +1 -1
- streamlit/static/static/js/{index.LypQPPkP.js → index.xTncca7J.js} +1 -1
- streamlit/static/static/js/{input.QeLiGsyn.js → input.EkJ_AsTP.js} +1 -1
- streamlit/static/static/js/{memory.0fYVo8Wx.js → memory.BFs17dZE.js} +1 -1
- streamlit/static/static/js/{mergeWith.AOqADio_.js → mergeWith.B4u0whL-.js} +1 -1
- streamlit/static/static/js/number-overlay-editor.DwazN43x.js +9 -0
- streamlit/static/static/js/{possibleConstructorReturn.C4RsC1R8.js → possibleConstructorReturn.CZfYLVBb.js} +1 -1
- streamlit/static/static/js/{sandbox.DT2p3KTe.js → sandbox.PjijA1v1.js} +1 -1
- streamlit/static/static/js/{textarea.DQh9RYKV.js → textarea.BGGnQXtw.js} +1 -1
- streamlit/static/static/js/{timepicker.Br_cR0hi.js → timepicker.eLEnk1tw.js} +1 -1
- streamlit/static/static/js/{toConsumableArray.CzYSWELu.js → toConsumableArray.CgKj9NUY.js} +1 -1
- streamlit/static/static/js/uniqueId.CPmOGhdZ.js +1 -0
- streamlit/static/static/js/{useBasicWidgetState.6R32QW2v.js → useBasicWidgetState.Bw_fxTtX.js} +1 -1
- streamlit/static/static/js/{useOnInputChange.C4OiWI1_.js → useOnInputChange.D8qi7pm4.js} +1 -1
- streamlit/static/static/js/{withFullScreenWrapper.BLeP_b5i.js → withFullScreenWrapper.BjVufR9b.js} +1 -1
- streamlit/user_info.py +4 -12
- {streamlit_nightly-1.42.3.dev20250224.dist-info → streamlit_nightly-1.42.3.dev20250226.dist-info}/METADATA +1 -1
- {streamlit_nightly-1.42.3.dev20250224.dist-info → streamlit_nightly-1.42.3.dev20250226.dist-info}/RECORD +88 -87
- {streamlit_nightly-1.42.3.dev20250224.dist-info → streamlit_nightly-1.42.3.dev20250226.dist-info}/WHEEL +1 -1
- streamlit/static/static/js/data-grid-overlay-editor.DUagmDpG.js +0 -1
- streamlit/static/static/js/index.C29vTftb.js +0 -3865
- streamlit/static/static/js/index.CUWXxL_C.js +0 -1
- streamlit/static/static/js/index.C_SUbLL7.js +0 -1
- streamlit/static/static/js/index.CdiPATR3.js +0 -197
- streamlit/static/static/js/index.Con6tiNg.js +0 -1
- streamlit/static/static/js/index.DymllY6d.js +0 -2
- streamlit/static/static/js/index.G1PSqufB.js +0 -9
- streamlit/static/static/js/index.RDHMaPCV.js +0 -1
- streamlit/static/static/js/number-overlay-editor.DAvAckzz.js +0 -9
- streamlit/static/static/js/uniqueId.BdUnRe3-.js +0 -1
- {streamlit_nightly-1.42.3.dev20250224.data → streamlit_nightly-1.42.3.dev20250226.data}/scripts/streamlit.cmd +0 -0
- {streamlit_nightly-1.42.3.dev20250224.dist-info → streamlit_nightly-1.42.3.dev20250226.dist-info}/entry_points.txt +0 -0
- {streamlit_nightly-1.42.3.dev20250224.dist-info → streamlit_nightly-1.42.3.dev20250226.dist-info}/top_level.txt +0 -0
streamlit/config.py
CHANGED
@@ -1021,6 +1021,7 @@ _create_option(
|
|
1021
1021
|
_create_option(
|
1022
1022
|
"theme.linkColor",
|
1023
1023
|
description="Color used for all links.",
|
1024
|
+
visibility="hidden",
|
1024
1025
|
)
|
1025
1026
|
|
1026
1027
|
_create_option(
|
@@ -1038,6 +1039,7 @@ _create_option(
|
|
1038
1039
|
The font family to use for code (monospace) in the app.
|
1039
1040
|
To use a custom font, it needs to be added via [theme.fontFaces].
|
1040
1041
|
""",
|
1042
|
+
visibility="hidden",
|
1041
1043
|
)
|
1042
1044
|
|
1043
1045
|
_create_option(
|
@@ -1045,16 +1047,18 @@ _create_option(
|
|
1045
1047
|
description="""
|
1046
1048
|
Configure a list of font faces that you can use for the app & code fonts.
|
1047
1049
|
""",
|
1050
|
+
visibility="hidden",
|
1048
1051
|
)
|
1049
1052
|
|
1050
1053
|
|
1051
1054
|
_create_option(
|
1052
|
-
"theme.
|
1055
|
+
"theme.baseRadius",
|
1053
1056
|
description="""
|
1054
|
-
The
|
1055
|
-
|
1057
|
+
The radius used as basis for the corners of most UI elements. Can be:
|
1058
|
+
"none", "small", "medium", "large", "full", or the number in pixel or rem.
|
1059
|
+
For example: "10px", "0.5rem", "1.2rem", "2rem".
|
1056
1060
|
""",
|
1057
|
-
|
1061
|
+
visibility="hidden",
|
1058
1062
|
)
|
1059
1063
|
|
1060
1064
|
_create_option(
|
@@ -1062,6 +1066,7 @@ _create_option(
|
|
1062
1066
|
description="""
|
1063
1067
|
The color of the border around elements.
|
1064
1068
|
""",
|
1069
|
+
visibility="hidden",
|
1065
1070
|
)
|
1066
1071
|
|
1067
1072
|
_create_option(
|
@@ -1071,6 +1076,7 @@ _create_option(
|
|
1071
1076
|
file_uploader, etc).
|
1072
1077
|
""",
|
1073
1078
|
type_=bool,
|
1079
|
+
visibility="hidden",
|
1074
1080
|
)
|
1075
1081
|
|
1076
1082
|
_create_option(
|
@@ -1080,6 +1086,7 @@ _create_option(
|
|
1080
1086
|
scale of text and UI elements. The default base font size is 16.
|
1081
1087
|
""",
|
1082
1088
|
type_=int,
|
1089
|
+
visibility="hidden",
|
1083
1090
|
)
|
1084
1091
|
|
1085
1092
|
# Config Section: Secrets #
|
streamlit/elements/arrow.py
CHANGED
@@ -228,7 +228,7 @@ class ArrowMixin:
|
|
228
228
|
width: int | None = None,
|
229
229
|
height: int | None = None,
|
230
230
|
*,
|
231
|
-
use_container_width: bool =
|
231
|
+
use_container_width: bool | None = None,
|
232
232
|
hide_index: bool | None = None,
|
233
233
|
column_order: Iterable[str] | None = None,
|
234
234
|
column_config: ColumnConfigMappingInput | None = None,
|
@@ -245,7 +245,7 @@ class ArrowMixin:
|
|
245
245
|
width: int | None = None,
|
246
246
|
height: int | None = None,
|
247
247
|
*,
|
248
|
-
use_container_width: bool =
|
248
|
+
use_container_width: bool | None = None,
|
249
249
|
hide_index: bool | None = None,
|
250
250
|
column_order: Iterable[str] | None = None,
|
251
251
|
column_config: ColumnConfigMappingInput | None = None,
|
@@ -262,7 +262,7 @@ class ArrowMixin:
|
|
262
262
|
width: int | None = None,
|
263
263
|
height: int | None = None,
|
264
264
|
*,
|
265
|
-
use_container_width: bool =
|
265
|
+
use_container_width: bool | None = None,
|
266
266
|
hide_index: bool | None = None,
|
267
267
|
column_order: Iterable[str] | None = None,
|
268
268
|
column_config: ColumnConfigMappingInput | None = None,
|
@@ -331,10 +331,10 @@ class ArrowMixin:
|
|
331
331
|
|
332
332
|
use_container_width : bool
|
333
333
|
Whether to override ``width`` with the width of the parent
|
334
|
-
container. If ``use_container_width`` is ``False
|
335
|
-
|
336
|
-
``use_container_width`` is ``True
|
337
|
-
the dataframe to match the width of the parent container.
|
334
|
+
container. If ``use_container_width`` is ``False``, Streamlit
|
335
|
+
sets the dataframe's width according to ``width``. If
|
336
|
+
``use_container_width`` is ``True`` (default), Streamlit sets the
|
337
|
+
width of the dataframe to match the width of the parent container.
|
338
338
|
|
339
339
|
hide_index : bool or None
|
340
340
|
Whether to hide the index column(s). If ``hide_index`` is ``None``
|
@@ -536,7 +536,8 @@ class ArrowMixin:
|
|
536
536
|
|
537
537
|
if on_select not in ["ignore", "rerun"] and not callable(on_select):
|
538
538
|
raise StreamlitAPIException(
|
539
|
-
f"You have passed {on_select} to `on_select`. But only 'ignore',
|
539
|
+
f"You have passed {on_select} to `on_select`. But only 'ignore', "
|
540
|
+
"'rerun', or a callable is supported."
|
540
541
|
)
|
541
542
|
|
542
543
|
key = to_key(key)
|
@@ -558,7 +559,14 @@ class ArrowMixin:
|
|
558
559
|
column_config_mapping = process_config_mapping(column_config)
|
559
560
|
|
560
561
|
proto = ArrowProto()
|
562
|
+
|
563
|
+
if use_container_width is None:
|
564
|
+
# If use_container_width was not explicitly set by the user, we set
|
565
|
+
# it to True if width was not set explicitly, and False otherwise.
|
566
|
+
use_container_width = True if width is None else False
|
567
|
+
|
561
568
|
proto.use_container_width = use_container_width
|
569
|
+
|
562
570
|
if width:
|
563
571
|
proto.width = width
|
564
572
|
if height:
|
@@ -374,9 +374,9 @@ class ChatMixin:
|
|
374
374
|
Parameters
|
375
375
|
----------
|
376
376
|
placeholder : str
|
377
|
-
A placeholder text shown when the chat input is empty.
|
378
|
-
"Your message"
|
379
|
-
empty string.
|
377
|
+
A placeholder text shown when the chat input is empty. This
|
378
|
+
defaults to ``"Your message"``. For accessibility reasons, you
|
379
|
+
should not use an empty string.
|
380
380
|
|
381
381
|
key : str or int
|
382
382
|
An optional string or integer to use as the unique key for the widget.
|
@@ -384,19 +384,44 @@ class ChatMixin:
|
|
384
384
|
its content. No two widgets may have the same key.
|
385
385
|
|
386
386
|
max_chars : int or None
|
387
|
-
The maximum number of characters that can be entered. If
|
388
|
-
(default), there will be no maximum.
|
387
|
+
The maximum number of characters that can be entered. If this is
|
388
|
+
``None`` (default), there will be no maximum.
|
389
389
|
|
390
|
-
accept_file : bool
|
391
|
-
Whether the chat input should accept files.
|
392
|
-
|
390
|
+
accept_file : bool or str
|
391
|
+
Whether the chat input should accept files. This can be one of the
|
392
|
+
following values:
|
393
393
|
|
394
|
-
|
395
|
-
|
394
|
+
- ``False`` (default): No files are accepted and the user can only
|
395
|
+
submit a message.
|
396
|
+
- ``True``: The user can add a single file to their submission.
|
397
|
+
- ``"multiple"``: The user can add multiple files to their
|
398
|
+
submission.
|
399
|
+
|
400
|
+
When the widget is configured to accept files, the accepted file
|
401
|
+
types can be configured with the ``file_type`` parameter.
|
402
|
+
|
403
|
+
By default, uploaded files are limited to 200 MB each. You can
|
404
|
+
configure this using the ``server.maxUploadSize`` config option.
|
405
|
+
For more information on how to set config options, see
|
406
|
+
|config.toml|_.
|
407
|
+
|
408
|
+
.. |config.toml| replace:: ``config.toml``
|
409
|
+
.. _config.toml: https://docs.streamlit.io/develop/api-reference/configuration/config.toml
|
410
|
+
|
411
|
+
file_type : str, Sequence[str], or None
|
412
|
+
The allowed file extension(s) for uploaded files. This can be one
|
413
|
+
of the following types:
|
396
414
|
|
397
|
-
|
398
|
-
|
399
|
-
|
415
|
+
- ``None`` (default): All file extensions are allowed.
|
416
|
+
- A string: A single file extension is allowed. For example, to
|
417
|
+
only accept CSV files, use ``"csv"``.
|
418
|
+
- A sequence of strings: Multiple file extensions are allowed. For
|
419
|
+
example, to only accept JPG/JPEG and PNG files, use
|
420
|
+
``["jpg", "jpeg", "png"]``.
|
421
|
+
|
422
|
+
disabled : bool
|
423
|
+
Whether the chat input should be disabled. This defaults to
|
424
|
+
``False``.
|
400
425
|
|
401
426
|
on_submit : callable
|
402
427
|
An optional callback invoked when the chat input's value is submitted.
|
@@ -409,12 +434,41 @@ class ChatMixin:
|
|
409
434
|
|
410
435
|
Returns
|
411
436
|
-------
|
412
|
-
str or
|
413
|
-
The
|
414
|
-
|
437
|
+
None, str, or dict-like
|
438
|
+
The user's submission. This is one of the following types:
|
439
|
+
|
440
|
+
- ``None``: If the user didn't submit a message or file in the last
|
441
|
+
rerun, the widget returns ``None``.
|
442
|
+
- A string: When the widget is not configured to accept files and
|
443
|
+
the user submitted a message in the last rerun, the widget
|
444
|
+
returns the user's message as a string.
|
445
|
+
- A dict-like object: When the widget is configured to accept files
|
446
|
+
and the user submitted a message and/or file(s) in the last
|
447
|
+
rerun, the widget returns a dict-like object with two attributes,
|
448
|
+
``text`` and ``files``.
|
449
|
+
|
450
|
+
When the widget is configured to accept files and the user submits
|
451
|
+
something in the last rerun, you can access the user's submission
|
452
|
+
with key or attribute notation from the dict-like object. This is
|
453
|
+
shown in Example 3 below.
|
454
|
+
|
455
|
+
The ``text`` attribute holds a string, which is the user's message.
|
456
|
+
This is an empty string if the user only submitted one or more
|
457
|
+
files.
|
458
|
+
|
459
|
+
The ``files`` attribute holds a list of UploadedFile objects.
|
460
|
+
The list is empty if the user only submitted a message. Unlike
|
461
|
+
``st.file_uploader``, this attribute always returns a list, even
|
462
|
+
when the widget is configured to accept only one file at a time.
|
463
|
+
|
464
|
+
The UploadedFile class is a subclass of BytesIO, and therefore is
|
465
|
+
"file-like". This means you can pass an instance of it anywhere a
|
466
|
+
file is expected.
|
415
467
|
|
416
468
|
Examples
|
417
469
|
--------
|
470
|
+
**Example 1: Pin the the chat input widget to the bottom of your app**
|
471
|
+
|
418
472
|
When ``st.chat_input`` is used in the main body of an app, it will be
|
419
473
|
pinned to the bottom of the page.
|
420
474
|
|
@@ -428,9 +482,11 @@ class ChatMixin:
|
|
428
482
|
https://doc-chat-input.streamlit.app/
|
429
483
|
height: 350px
|
430
484
|
|
485
|
+
**Example 2: Use the chat input widget inline**
|
486
|
+
|
431
487
|
The chat input can also be used inline by nesting it inside any layout
|
432
488
|
container (container, columns, tabs, sidebar, etc) or fragment. Create
|
433
|
-
chat interfaces embedded next to other content or have multiple
|
489
|
+
chat interfaces embedded next to other content, or have multiple
|
434
490
|
chatbots!
|
435
491
|
|
436
492
|
>>> import streamlit as st
|
@@ -444,6 +500,32 @@ class ChatMixin:
|
|
444
500
|
.. output ::
|
445
501
|
https://doc-chat-input-inline.streamlit.app/
|
446
502
|
height: 350px
|
503
|
+
|
504
|
+
**Example 3: Let users upload files**
|
505
|
+
|
506
|
+
When you configure your chat input widget to allow file attachments, it
|
507
|
+
will return a dict-like object when the user sends a submission. You
|
508
|
+
can access the user's message through the ``text`` attribute of this
|
509
|
+
dictionary. You can access a list of the user's submitted file(s)
|
510
|
+
through the ``files`` attribute. Similar to ``st.session_state``, you
|
511
|
+
can use key or attribute notation.
|
512
|
+
|
513
|
+
>>> import streamlit as st
|
514
|
+
>>>
|
515
|
+
>>> prompt = st.chat_input(
|
516
|
+
>>> "Say something and/or attach an image",
|
517
|
+
>>> accept_file=True,
|
518
|
+
>>> file_type=["jpg", "jpeg", "png"],
|
519
|
+
>>> )
|
520
|
+
>>> if prompt and prompt.text:
|
521
|
+
>>> st.markdown(prompt.text)
|
522
|
+
>>> if prompt and prompt["files"]:
|
523
|
+
>>> st.image(prompt["files"][0])
|
524
|
+
|
525
|
+
.. output ::
|
526
|
+
https://doc-chat-input-file-uploader.streamlit.app/
|
527
|
+
height: 350px
|
528
|
+
|
447
529
|
"""
|
448
530
|
# We default to an empty string here and disallow user choice intentionally
|
449
531
|
default = ""
|
@@ -543,7 +543,7 @@ class DataEditorMixin:
|
|
543
543
|
*,
|
544
544
|
width: int | None = None,
|
545
545
|
height: int | None = None,
|
546
|
-
use_container_width: bool =
|
546
|
+
use_container_width: bool | None = None,
|
547
547
|
hide_index: bool | None = None,
|
548
548
|
column_order: Iterable[str] | None = None,
|
549
549
|
column_config: ColumnConfigMappingInput | None = None,
|
@@ -564,7 +564,7 @@ class DataEditorMixin:
|
|
564
564
|
*,
|
565
565
|
width: int | None = None,
|
566
566
|
height: int | None = None,
|
567
|
-
use_container_width: bool =
|
567
|
+
use_container_width: bool | None = None,
|
568
568
|
hide_index: bool | None = None,
|
569
569
|
column_order: Iterable[str] | None = None,
|
570
570
|
column_config: ColumnConfigMappingInput | None = None,
|
@@ -585,7 +585,7 @@ class DataEditorMixin:
|
|
585
585
|
*,
|
586
586
|
width: int | None = None,
|
587
587
|
height: int | None = None,
|
588
|
-
use_container_width: bool =
|
588
|
+
use_container_width: bool | None = None,
|
589
589
|
hide_index: bool | None = None,
|
590
590
|
column_order: Iterable[str] | None = None,
|
591
591
|
column_config: ColumnConfigMappingInput | None = None,
|
@@ -636,10 +636,10 @@ class DataEditorMixin:
|
|
636
636
|
|
637
637
|
use_container_width : bool
|
638
638
|
Whether to override ``width`` with the width of the parent
|
639
|
-
container. If ``use_container_width`` is ``False
|
640
|
-
|
641
|
-
``use_container_width`` is ``True
|
642
|
-
the data editor to match the width of the parent container.
|
639
|
+
container. If ``use_container_width`` is ``False``, Streamlit
|
640
|
+
sets the data editor's width according to ``width``. If
|
641
|
+
``use_container_width`` is ``True`` (default), Streamlit sets the
|
642
|
+
width of the data editor to match the width of the parent container.
|
643
643
|
|
644
644
|
hide_index : bool or None
|
645
645
|
Whether to hide the index column(s). If ``hide_index`` is ``None``
|
@@ -911,6 +911,11 @@ class DataEditorMixin:
|
|
911
911
|
proto = ArrowProto()
|
912
912
|
proto.id = element_id
|
913
913
|
|
914
|
+
if use_container_width is None:
|
915
|
+
# If use_container_width was not explicitly set by the user, we set
|
916
|
+
# it to True if width was not set explicitly, and False otherwise.
|
917
|
+
use_container_width = True if width is None else False
|
918
|
+
|
914
919
|
proto.use_container_width = use_container_width
|
915
920
|
|
916
921
|
if width:
|
@@ -235,10 +235,12 @@ class FileUploaderMixin:
|
|
235
235
|
label_visibility: LabelVisibility = "visible",
|
236
236
|
) -> UploadedFile | list[UploadedFile] | None:
|
237
237
|
r"""Display a file uploader widget.
|
238
|
-
By default, uploaded files are limited to
|
239
|
-
this using the ``server.maxUploadSize`` config option. For
|
240
|
-
on how to set config options, see
|
241
|
-
|
238
|
+
By default, uploaded files are limited to 200 MB each. You can
|
239
|
+
configure this using the ``server.maxUploadSize`` config option. For
|
240
|
+
more information on how to set config options, see |config.toml|_.
|
241
|
+
|
242
|
+
.. |config.toml| replace:: ``config.toml``
|
243
|
+
.. _config.toml: https://docs.streamlit.io/develop/api-reference/configuration/config.toml
|
242
244
|
|
243
245
|
Parameters
|
244
246
|
----------
|
@@ -265,13 +267,21 @@ class FileUploaderMixin:
|
|
265
267
|
.. _st.markdown: https://docs.streamlit.io/develop/api-reference/text/st.markdown
|
266
268
|
|
267
269
|
type : str or list of str or None
|
268
|
-
|
269
|
-
|
270
|
+
The allowed file extension(s) for uploaded files. This can be one
|
271
|
+
of the following types:
|
272
|
+
|
273
|
+
- ``None`` (default): All file extensions are allowed.
|
274
|
+
- A string: A single file extension is allowed. For example, to
|
275
|
+
only accept CSV files, use ``"csv"``.
|
276
|
+
- A sequence of strings: Multiple file extensions are allowed. For
|
277
|
+
example, to only accept JPG/JPEG and PNG files, use
|
278
|
+
``["jpg", "jpeg", "png"]``.
|
270
279
|
|
271
280
|
accept_multiple_files : bool
|
272
|
-
|
273
|
-
|
274
|
-
|
281
|
+
Whether to accept more than one file in a submission. If this is
|
282
|
+
``False`` (default), the user can only submit one file at a time.
|
283
|
+
If this is ``True``, the user can upload multiple files at the same
|
284
|
+
time, in which case the return value will be a list of files.
|
275
285
|
|
276
286
|
key : str or int
|
277
287
|
An optional string or integer to use as the unique key for the widget.
|
@@ -309,7 +319,7 @@ class FileUploaderMixin:
|
|
309
319
|
|
310
320
|
Returns
|
311
321
|
-------
|
312
|
-
None
|
322
|
+
None, UploadedFile, or list of UploadedFile
|
313
323
|
- If accept_multiple_files is False, returns either None or
|
314
324
|
an UploadedFile object.
|
315
325
|
- If accept_multiple_files is True, returns a list with the
|
@@ -15,7 +15,7 @@ _sym_db = _symbol_database.Default()
|
|
15
15
|
from streamlit.proto import WidgetStates_pb2 as streamlit_dot_proto_dot_WidgetStates__pb2
|
16
16
|
|
17
17
|
|
18
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!streamlit/proto/ClientState.proto\x1a\"streamlit/proto/WidgetStates.proto\"\
|
18
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!streamlit/proto/ClientState.proto\x1a\"streamlit/proto/WidgetStates.proto\"c\n\x0b\x43ontextInfo\x12\x15\n\x08timezone\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0ftimezone_offset\x18\x02 \x01(\x05H\x01\x88\x01\x01\x42\x0b\n\t_timezoneB\x12\n\x10_timezone_offset\"\xc6\x01\n\x0b\x43lientState\x12\x14\n\x0cquery_string\x18\x01 \x01(\t\x12$\n\rwidget_states\x18\x02 \x01(\x0b\x32\r.WidgetStates\x12\x18\n\x10page_script_hash\x18\x03 \x01(\t\x12\x11\n\tpage_name\x18\x04 \x01(\t\x12\x13\n\x0b\x66ragment_id\x18\x05 \x01(\t\x12\x15\n\ris_auto_rerun\x18\x06 \x01(\x08\x12\"\n\x0c\x63ontext_info\x18\x08 \x01(\x0b\x32\x0c.ContextInfoB0\n\x1c\x63om.snowflake.apps.streamlitB\x10\x43lientStateProtob\x06proto3')
|
19
19
|
|
20
20
|
_globals = globals()
|
21
21
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
@@ -23,6 +23,8 @@ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'streamlit.proto.ClientState
|
|
23
23
|
if not _descriptor._USE_C_DESCRIPTORS:
|
24
24
|
_globals['DESCRIPTOR']._loaded_options = None
|
25
25
|
_globals['DESCRIPTOR']._serialized_options = b'\n\034com.snowflake.apps.streamlitB\020ClientStateProto'
|
26
|
-
_globals['
|
27
|
-
_globals['
|
26
|
+
_globals['_CONTEXTINFO']._serialized_start=73
|
27
|
+
_globals['_CONTEXTINFO']._serialized_end=172
|
28
|
+
_globals['_CLIENTSTATE']._serialized_start=175
|
29
|
+
_globals['_CLIENTSTATE']._serialized_end=373
|
28
30
|
# @@protoc_insertion_point(module_scope)
|
@@ -25,6 +25,29 @@ import typing
|
|
25
25
|
|
26
26
|
DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
|
27
27
|
|
28
|
+
@typing.final
|
29
|
+
class ContextInfo(google.protobuf.message.Message):
|
30
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
31
|
+
|
32
|
+
TIMEZONE_FIELD_NUMBER: builtins.int
|
33
|
+
TIMEZONE_OFFSET_FIELD_NUMBER: builtins.int
|
34
|
+
timezone: builtins.str
|
35
|
+
timezone_offset: builtins.int
|
36
|
+
def __init__(
|
37
|
+
self,
|
38
|
+
*,
|
39
|
+
timezone: builtins.str | None = ...,
|
40
|
+
timezone_offset: builtins.int | None = ...,
|
41
|
+
) -> None: ...
|
42
|
+
def HasField(self, field_name: typing.Literal["_timezone", b"_timezone", "_timezone_offset", b"_timezone_offset", "timezone", b"timezone", "timezone_offset", b"timezone_offset"]) -> builtins.bool: ...
|
43
|
+
def ClearField(self, field_name: typing.Literal["_timezone", b"_timezone", "_timezone_offset", b"_timezone_offset", "timezone", b"timezone", "timezone_offset", b"timezone_offset"]) -> None: ...
|
44
|
+
@typing.overload
|
45
|
+
def WhichOneof(self, oneof_group: typing.Literal["_timezone", b"_timezone"]) -> typing.Literal["timezone"] | None: ...
|
46
|
+
@typing.overload
|
47
|
+
def WhichOneof(self, oneof_group: typing.Literal["_timezone_offset", b"_timezone_offset"]) -> typing.Literal["timezone_offset"] | None: ...
|
48
|
+
|
49
|
+
global___ContextInfo = ContextInfo
|
50
|
+
|
28
51
|
@typing.final
|
29
52
|
class ClientState(google.protobuf.message.Message):
|
30
53
|
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
@@ -35,6 +58,7 @@ class ClientState(google.protobuf.message.Message):
|
|
35
58
|
PAGE_NAME_FIELD_NUMBER: builtins.int
|
36
59
|
FRAGMENT_ID_FIELD_NUMBER: builtins.int
|
37
60
|
IS_AUTO_RERUN_FIELD_NUMBER: builtins.int
|
61
|
+
CONTEXT_INFO_FIELD_NUMBER: builtins.int
|
38
62
|
query_string: builtins.str
|
39
63
|
page_script_hash: builtins.str
|
40
64
|
page_name: builtins.str
|
@@ -42,6 +66,8 @@ class ClientState(google.protobuf.message.Message):
|
|
42
66
|
is_auto_rerun: builtins.bool
|
43
67
|
@property
|
44
68
|
def widget_states(self) -> streamlit.proto.WidgetStates_pb2.WidgetStates: ...
|
69
|
+
@property
|
70
|
+
def context_info(self) -> global___ContextInfo: ...
|
45
71
|
def __init__(
|
46
72
|
self,
|
47
73
|
*,
|
@@ -51,8 +77,9 @@ class ClientState(google.protobuf.message.Message):
|
|
51
77
|
page_name: builtins.str = ...,
|
52
78
|
fragment_id: builtins.str = ...,
|
53
79
|
is_auto_rerun: builtins.bool = ...,
|
80
|
+
context_info: global___ContextInfo | None = ...,
|
54
81
|
) -> None: ...
|
55
|
-
def HasField(self, field_name: typing.Literal["widget_states", b"widget_states"]) -> builtins.bool: ...
|
56
|
-
def ClearField(self, field_name: typing.Literal["fragment_id", b"fragment_id", "is_auto_rerun", b"is_auto_rerun", "page_name", b"page_name", "page_script_hash", b"page_script_hash", "query_string", b"query_string", "widget_states", b"widget_states"]) -> None: ...
|
82
|
+
def HasField(self, field_name: typing.Literal["context_info", b"context_info", "widget_states", b"widget_states"]) -> builtins.bool: ...
|
83
|
+
def ClearField(self, field_name: typing.Literal["context_info", b"context_info", "fragment_id", b"fragment_id", "is_auto_rerun", b"is_auto_rerun", "page_name", b"page_name", "page_script_hash", b"page_script_hash", "query_string", b"query_string", "widget_states", b"widget_states"]) -> None: ...
|
57
84
|
|
58
85
|
global___ClientState = ClientState
|
@@ -16,7 +16,7 @@ from streamlit.proto import AppPage_pb2 as streamlit_dot_proto_dot_AppPage__pb2
|
|
16
16
|
from streamlit.proto import SessionStatus_pb2 as streamlit_dot_proto_dot_SessionStatus__pb2
|
17
17
|
|
18
18
|
|
19
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n streamlit/proto/NewSession.proto\x1a\x1dstreamlit/proto/AppPage.proto\x1a#streamlit/proto/SessionStatus.proto\"\xa5\x02\n\nNewSession\x12\x1f\n\ninitialize\x18\x01 \x01(\x0b\x32\x0b.Initialize\x12\x15\n\rscript_run_id\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\x18\n\x10main_script_path\x18\x04 \x01(\t\x12\x17\n\x06\x63onfig\x18\x06 \x01(\x0b\x32\x07.Config\x12(\n\x0c\x63ustom_theme\x18\x07 \x01(\x0b\x32\x12.CustomThemeConfig\x12\x1b\n\tapp_pages\x18\x08 \x03(\x0b\x32\x08.AppPage\x12\x18\n\x10page_script_hash\x18\t \x01(\t\x12\x1d\n\x15\x66ragment_ids_this_run\x18\n \x03(\t\x12\x18\n\x10main_script_hash\x18\x0b \x01(\tJ\x04\x08\x05\x10\x06\"\xba\x01\n\nInitialize\x12\x1c\n\tuser_info\x18\x01 \x01(\x0b\x32\t.UserInfo\x12*\n\x10\x65nvironment_info\x18\x03 \x01(\x0b\x32\x10.EnvironmentInfo\x12&\n\x0esession_status\x18\x04 \x01(\x0b\x32\x0e.SessionStatus\x12\x14\n\x0c\x63ommand_line\x18\x05 \x01(\t\x12\x12\n\nsession_id\x18\x06 \x01(\t\x12\x10\n\x08is_hello\x18\x07 \x01(\x08\"\x97\x02\n\x06\x43onfig\x12\x1a\n\x12gather_usage_stats\x18\x02 \x01(\x08\x12\x1e\n\x16max_cached_message_age\x18\x03 \x01(\x05\x12\x14\n\x0cmapbox_token\x18\x04 \x01(\t\x12\x19\n\x11\x61llow_run_on_save\x18\x05 \x01(\x08\x12\x14\n\x0chide_top_bar\x18\x06 \x01(\x08\x12\x18\n\x10hide_sidebar_nav\x18\x07 \x01(\x08\x12)\n\x0ctoolbar_mode\x18\x08 \x01(\x0e\x32\x13.Config.ToolbarMode\"?\n\x0bToolbarMode\x12\x08\n\x04\x41UTO\x10\x00\x12\r\n\tDEVELOPER\x10\x01\x12\n\n\x06VIEWER\x10\x02\x12\x0b\n\x07MINIMAL\x10\x03J\x04\x08\x01\x10\x02\"\
|
19
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n streamlit/proto/NewSession.proto\x1a\x1dstreamlit/proto/AppPage.proto\x1a#streamlit/proto/SessionStatus.proto\"\xa5\x02\n\nNewSession\x12\x1f\n\ninitialize\x18\x01 \x01(\x0b\x32\x0b.Initialize\x12\x15\n\rscript_run_id\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\x18\n\x10main_script_path\x18\x04 \x01(\t\x12\x17\n\x06\x63onfig\x18\x06 \x01(\x0b\x32\x07.Config\x12(\n\x0c\x63ustom_theme\x18\x07 \x01(\x0b\x32\x12.CustomThemeConfig\x12\x1b\n\tapp_pages\x18\x08 \x03(\x0b\x32\x08.AppPage\x12\x18\n\x10page_script_hash\x18\t \x01(\t\x12\x1d\n\x15\x66ragment_ids_this_run\x18\n \x03(\t\x12\x18\n\x10main_script_hash\x18\x0b \x01(\tJ\x04\x08\x05\x10\x06\"\xba\x01\n\nInitialize\x12\x1c\n\tuser_info\x18\x01 \x01(\x0b\x32\t.UserInfo\x12*\n\x10\x65nvironment_info\x18\x03 \x01(\x0b\x32\x10.EnvironmentInfo\x12&\n\x0esession_status\x18\x04 \x01(\x0b\x32\x0e.SessionStatus\x12\x14\n\x0c\x63ommand_line\x18\x05 \x01(\t\x12\x12\n\nsession_id\x18\x06 \x01(\t\x12\x10\n\x08is_hello\x18\x07 \x01(\x08\"\x97\x02\n\x06\x43onfig\x12\x1a\n\x12gather_usage_stats\x18\x02 \x01(\x08\x12\x1e\n\x16max_cached_message_age\x18\x03 \x01(\x05\x12\x14\n\x0cmapbox_token\x18\x04 \x01(\t\x12\x19\n\x11\x61llow_run_on_save\x18\x05 \x01(\x08\x12\x14\n\x0chide_top_bar\x18\x06 \x01(\x08\x12\x18\n\x10hide_sidebar_nav\x18\x07 \x01(\x08\x12)\n\x0ctoolbar_mode\x18\x08 \x01(\x0e\x32\x13.Config.ToolbarMode\"?\n\x0bToolbarMode\x12\x08\n\x04\x41UTO\x10\x00\x12\r\n\tDEVELOPER\x10\x01\x12\n\n\x06VIEWER\x10\x02\x12\x0b\n\x07MINIMAL\x10\x03J\x04\x08\x01\x10\x02\"\x80\x06\n\x11\x43ustomThemeConfig\x12\x15\n\rprimary_color\x18\x01 \x01(\t\x12\"\n\x1asecondary_background_color\x18\x02 \x01(\t\x12\x18\n\x10\x62\x61\x63kground_color\x18\x03 \x01(\t\x12\x12\n\ntext_color\x18\x04 \x01(\t\x12+\n\x04\x66ont\x18\x05 \x01(\x0e\x32\x1d.CustomThemeConfig.FontFamily\x12*\n\x04\x62\x61se\x18\x06 \x01(\x0e\x32\x1c.CustomThemeConfig.BaseTheme\x12\x1f\n\x17widget_background_color\x18\x07 \x01(\t\x12\x1b\n\x13widget_border_color\x18\x08 \x01(\t\x12\x15\n\x05radii\x18\t \x01(\x0b\x32\x06.Radii\x12\x11\n\tbody_font\x18\r \x01(\t\x12\x11\n\tcode_font\x18\x0e \x01(\t\x12\x1d\n\nfont_faces\x18\x0f \x03(\x0b\x32\t.FontFace\x12\x1e\n\nfont_sizes\x18\x10 \x01(\x0b\x32\n.FontSizes\x12!\n\x19skeleton_background_color\x18\x11 \x01(\t\x12\x18\n\x0b\x62\x61se_radius\x18\x12 \x01(\tH\x00\x88\x01\x01\x12\x19\n\x0c\x62order_color\x18\x13 \x01(\tH\x01\x88\x01\x01\x12&\n\x19show_border_around_inputs\x18\x14 \x01(\x08H\x02\x88\x01\x01\x12\x17\n\nlink_color\x18\x15 \x01(\tH\x03\x88\x01\x01\x12\x1b\n\x0e\x62\x61se_font_size\x18\x16 \x01(\x05H\x04\x88\x01\x01\" \n\tBaseTheme\x12\t\n\x05LIGHT\x10\x00\x12\x08\n\x04\x44\x41RK\x10\x01\"6\n\nFontFamily\x12\x0e\n\nSANS_SERIF\x10\x00\x12\t\n\x05SERIF\x10\x01\x12\r\n\tMONOSPACE\x10\x02\x42\x0e\n\x0c_base_radiusB\x0f\n\r_border_colorB\x1c\n\x1a_show_border_around_inputsB\r\n\x0b_link_colorB\x11\n\x0f_base_font_size\"F\n\x08\x46ontFace\x12\x0b\n\x03url\x18\x01 \x01(\t\x12\x0e\n\x06\x66\x61mily\x18\x02 \x01(\t\x12\x0e\n\x06weight\x18\x03 \x01(\x05\x12\r\n\x05style\x18\x04 \x01(\t\"<\n\x05Radii\x12\x1a\n\x12\x62\x61se_widget_radius\x18\x01 \x01(\x05\x12\x17\n\x0f\x63heckbox_radius\x18\x02 \x01(\x05\"T\n\tFontSizes\x12\x16\n\x0etiny_font_size\x18\x01 \x01(\x05\x12\x17\n\x0fsmall_font_size\x18\x02 \x01(\x05\x12\x16\n\x0e\x62\x61se_font_size\x18\x03 \x01(\x05\"E\n\x08UserInfo\x12\x17\n\x0finstallation_id\x18\x01 \x01(\t\x12\x1a\n\x12installation_id_v3\x18\x05 \x01(\tJ\x04\x08\x02\x10\x03\"D\n\x0f\x45nvironmentInfo\x12\x19\n\x11streamlit_version\x18\x01 \x01(\t\x12\x16\n\x0epython_version\x18\x02 \x01(\tB/\n\x1c\x63om.snowflake.apps.streamlitB\x0fNewSessionProtob\x06proto3')
|
20
20
|
|
21
21
|
_globals = globals()
|
22
22
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
@@ -33,19 +33,19 @@ if not _descriptor._USE_C_DESCRIPTORS:
|
|
33
33
|
_globals['_CONFIG_TOOLBARMODE']._serialized_start=800
|
34
34
|
_globals['_CONFIG_TOOLBARMODE']._serialized_end=863
|
35
35
|
_globals['_CUSTOMTHEMECONFIG']._serialized_start=872
|
36
|
-
_globals['_CUSTOMTHEMECONFIG']._serialized_end=
|
37
|
-
_globals['_CUSTOMTHEMECONFIG_BASETHEME']._serialized_start=
|
38
|
-
_globals['_CUSTOMTHEMECONFIG_BASETHEME']._serialized_end=
|
39
|
-
_globals['_CUSTOMTHEMECONFIG_FONTFAMILY']._serialized_start=
|
40
|
-
_globals['_CUSTOMTHEMECONFIG_FONTFAMILY']._serialized_end=
|
41
|
-
_globals['_FONTFACE']._serialized_start=
|
42
|
-
_globals['_FONTFACE']._serialized_end=
|
43
|
-
_globals['_RADII']._serialized_start=
|
44
|
-
_globals['_RADII']._serialized_end=
|
45
|
-
_globals['_FONTSIZES']._serialized_start=
|
46
|
-
_globals['_FONTSIZES']._serialized_end=
|
47
|
-
_globals['_USERINFO']._serialized_start=
|
48
|
-
_globals['_USERINFO']._serialized_end=
|
49
|
-
_globals['_ENVIRONMENTINFO']._serialized_start=
|
50
|
-
_globals['_ENVIRONMENTINFO']._serialized_end=
|
36
|
+
_globals['_CUSTOMTHEMECONFIG']._serialized_end=1640
|
37
|
+
_globals['_CUSTOMTHEMECONFIG_BASETHEME']._serialized_start=1455
|
38
|
+
_globals['_CUSTOMTHEMECONFIG_BASETHEME']._serialized_end=1487
|
39
|
+
_globals['_CUSTOMTHEMECONFIG_FONTFAMILY']._serialized_start=1489
|
40
|
+
_globals['_CUSTOMTHEMECONFIG_FONTFAMILY']._serialized_end=1543
|
41
|
+
_globals['_FONTFACE']._serialized_start=1642
|
42
|
+
_globals['_FONTFACE']._serialized_end=1712
|
43
|
+
_globals['_RADII']._serialized_start=1714
|
44
|
+
_globals['_RADII']._serialized_end=1774
|
45
|
+
_globals['_FONTSIZES']._serialized_start=1776
|
46
|
+
_globals['_FONTSIZES']._serialized_end=1860
|
47
|
+
_globals['_USERINFO']._serialized_start=1862
|
48
|
+
_globals['_USERINFO']._serialized_end=1931
|
49
|
+
_globals['_ENVIRONMENTINFO']._serialized_start=1933
|
50
|
+
_globals['_ENVIRONMENTINFO']._serialized_end=2001
|
51
51
|
# @@protoc_insertion_point(module_scope)
|
@@ -283,7 +283,7 @@ class CustomThemeConfig(google.protobuf.message.Message):
|
|
283
283
|
FONT_FACES_FIELD_NUMBER: builtins.int
|
284
284
|
FONT_SIZES_FIELD_NUMBER: builtins.int
|
285
285
|
SKELETON_BACKGROUND_COLOR_FIELD_NUMBER: builtins.int
|
286
|
-
|
286
|
+
BASE_RADIUS_FIELD_NUMBER: builtins.int
|
287
287
|
BORDER_COLOR_FIELD_NUMBER: builtins.int
|
288
288
|
SHOW_BORDER_AROUND_INPUTS_FIELD_NUMBER: builtins.int
|
289
289
|
LINK_COLOR_FIELD_NUMBER: builtins.int
|
@@ -303,14 +303,14 @@ class CustomThemeConfig(google.protobuf.message.Message):
|
|
303
303
|
code_font: builtins.str
|
304
304
|
skeleton_background_color: builtins.str
|
305
305
|
"""DEPRECATED: This color is not applied anymore:"""
|
306
|
-
|
306
|
+
base_radius: builtins.str
|
307
307
|
border_color: builtins.str
|
308
308
|
show_border_around_inputs: builtins.bool
|
309
309
|
link_color: builtins.str
|
310
310
|
base_font_size: builtins.int
|
311
311
|
@property
|
312
312
|
def radii(self) -> global___Radii:
|
313
|
-
"""DEPRECATED: Please use the
|
313
|
+
"""DEPRECATED: Please use the base_radius theme config instead:"""
|
314
314
|
|
315
315
|
@property
|
316
316
|
def font_faces(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___FontFace]: ...
|
@@ -335,23 +335,23 @@ class CustomThemeConfig(google.protobuf.message.Message):
|
|
335
335
|
font_faces: collections.abc.Iterable[global___FontFace] | None = ...,
|
336
336
|
font_sizes: global___FontSizes | None = ...,
|
337
337
|
skeleton_background_color: builtins.str = ...,
|
338
|
-
|
338
|
+
base_radius: builtins.str | None = ...,
|
339
339
|
border_color: builtins.str | None = ...,
|
340
340
|
show_border_around_inputs: builtins.bool | None = ...,
|
341
341
|
link_color: builtins.str | None = ...,
|
342
342
|
base_font_size: builtins.int | None = ...,
|
343
343
|
) -> None: ...
|
344
|
-
def HasField(self, field_name: typing.Literal["_base_font_size", b"_base_font_size", "
|
345
|
-
def ClearField(self, field_name: typing.Literal["_base_font_size", b"_base_font_size", "
|
344
|
+
def HasField(self, field_name: typing.Literal["_base_font_size", b"_base_font_size", "_base_radius", b"_base_radius", "_border_color", b"_border_color", "_link_color", b"_link_color", "_show_border_around_inputs", b"_show_border_around_inputs", "base_font_size", b"base_font_size", "base_radius", b"base_radius", "border_color", b"border_color", "font_sizes", b"font_sizes", "link_color", b"link_color", "radii", b"radii", "show_border_around_inputs", b"show_border_around_inputs"]) -> builtins.bool: ...
|
345
|
+
def ClearField(self, field_name: typing.Literal["_base_font_size", b"_base_font_size", "_base_radius", b"_base_radius", "_border_color", b"_border_color", "_link_color", b"_link_color", "_show_border_around_inputs", b"_show_border_around_inputs", "background_color", b"background_color", "base", b"base", "base_font_size", b"base_font_size", "base_radius", b"base_radius", "body_font", b"body_font", "border_color", b"border_color", "code_font", b"code_font", "font", b"font", "font_faces", b"font_faces", "font_sizes", b"font_sizes", "link_color", b"link_color", "primary_color", b"primary_color", "radii", b"radii", "secondary_background_color", b"secondary_background_color", "show_border_around_inputs", b"show_border_around_inputs", "skeleton_background_color", b"skeleton_background_color", "text_color", b"text_color", "widget_background_color", b"widget_background_color", "widget_border_color", b"widget_border_color"]) -> None: ...
|
346
346
|
@typing.overload
|
347
347
|
def WhichOneof(self, oneof_group: typing.Literal["_base_font_size", b"_base_font_size"]) -> typing.Literal["base_font_size"] | None: ...
|
348
348
|
@typing.overload
|
349
|
+
def WhichOneof(self, oneof_group: typing.Literal["_base_radius", b"_base_radius"]) -> typing.Literal["base_radius"] | None: ...
|
350
|
+
@typing.overload
|
349
351
|
def WhichOneof(self, oneof_group: typing.Literal["_border_color", b"_border_color"]) -> typing.Literal["border_color"] | None: ...
|
350
352
|
@typing.overload
|
351
353
|
def WhichOneof(self, oneof_group: typing.Literal["_link_color", b"_link_color"]) -> typing.Literal["link_color"] | None: ...
|
352
354
|
@typing.overload
|
353
|
-
def WhichOneof(self, oneof_group: typing.Literal["_roundness", b"_roundness"]) -> typing.Literal["roundness"] | None: ...
|
354
|
-
@typing.overload
|
355
355
|
def WhichOneof(self, oneof_group: typing.Literal["_show_border_around_inputs", b"_show_border_around_inputs"]) -> typing.Literal["show_border_around_inputs"] | None: ...
|
356
356
|
|
357
357
|
global___CustomThemeConfig = CustomThemeConfig
|
@@ -382,7 +382,7 @@ global___FontFace = FontFace
|
|
382
382
|
|
383
383
|
@typing.final
|
384
384
|
class Radii(google.protobuf.message.Message):
|
385
|
-
"""DEPRECATED: Please use the
|
385
|
+
"""DEPRECATED: Please use the base_radius theme config instead."""
|
386
386
|
|
387
387
|
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
388
388
|
|
streamlit/runtime/app_session.py
CHANGED
@@ -353,6 +353,7 @@ class AppSession:
|
|
353
353
|
to use previous client state.
|
354
354
|
|
355
355
|
"""
|
356
|
+
|
356
357
|
if self._state == AppSessionState.SHUTDOWN_REQUESTED:
|
357
358
|
_LOGGER.warning("Discarding rerun request after shutdown")
|
358
359
|
return
|
@@ -382,6 +383,9 @@ class AppSession:
|
|
382
383
|
)
|
383
384
|
return
|
384
385
|
|
386
|
+
if client_state.HasField("context_info"):
|
387
|
+
self._client_state.context_info.CopyFrom(client_state.context_info)
|
388
|
+
|
385
389
|
rerun_data = RerunData(
|
386
390
|
client_state.query_string,
|
387
391
|
client_state.widget_states,
|
@@ -389,6 +393,7 @@ class AppSession:
|
|
389
393
|
client_state.page_name,
|
390
394
|
fragment_id=fragment_id if fragment_id else None,
|
391
395
|
is_auto_rerun=client_state.is_auto_rerun,
|
396
|
+
context_info=client_state.context_info,
|
392
397
|
)
|
393
398
|
else:
|
394
399
|
rerun_data = RerunData()
|