streamlit-nightly 1.36.1.dev20240720__py2.py3-none-any.whl → 1.36.1.dev20240722__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/commands/execution_control.py +17 -12
- streamlit/config.py +8 -4
- streamlit/elements/alert.py +6 -6
- streamlit/elements/dialog_decorator.py +1 -0
- streamlit/elements/heading.py +29 -52
- streamlit/elements/layouts.py +44 -83
- streamlit/elements/markdown.py +12 -17
- streamlit/elements/metric.py +19 -24
- streamlit/elements/progress.py +10 -20
- streamlit/elements/toast.py +6 -16
- streamlit/elements/vega_charts.py +49 -12
- streamlit/elements/widgets/button.py +74 -81
- streamlit/elements/widgets/button_group.py +50 -22
- streamlit/elements/widgets/camera_input.py +12 -21
- streamlit/elements/widgets/checkbox.py +40 -42
- streamlit/elements/widgets/color_picker.py +20 -21
- streamlit/elements/widgets/file_uploader.py +13 -21
- streamlit/elements/widgets/multiselect.py +24 -22
- streamlit/elements/widgets/number_input.py +31 -25
- streamlit/elements/widgets/radio.py +24 -21
- streamlit/elements/widgets/select_slider.py +22 -21
- streamlit/elements/widgets/selectbox.py +23 -21
- streamlit/elements/widgets/slider.py +24 -21
- streamlit/elements/widgets/text_widgets.py +48 -43
- streamlit/elements/widgets/time_widgets.py +44 -42
- streamlit/runtime/context.py +55 -7
- streamlit/runtime/fragment.py +3 -4
- streamlit/static/asset-manifest.json +3 -3
- streamlit/static/index.html +1 -1
- streamlit/static/static/js/7175.2779947a.chunk.js +1 -0
- streamlit/static/static/js/{main.d55f6a3c.js → main.35bc5645.js} +2 -2
- streamlit/testing/v1/app_test.py +10 -0
- {streamlit_nightly-1.36.1.dev20240720.dist-info → streamlit_nightly-1.36.1.dev20240722.dist-info}/METADATA +1 -1
- {streamlit_nightly-1.36.1.dev20240720.dist-info → streamlit_nightly-1.36.1.dev20240722.dist-info}/RECORD +39 -39
- {streamlit_nightly-1.36.1.dev20240720.dist-info → streamlit_nightly-1.36.1.dev20240722.dist-info}/WHEEL +1 -1
- streamlit/static/static/js/7175.4cdaec13.chunk.js +0 -1
- /streamlit/static/static/js/{main.d55f6a3c.js.LICENSE.txt → main.35bc5645.js.LICENSE.txt} +0 -0
- {streamlit_nightly-1.36.1.dev20240720.data → streamlit_nightly-1.36.1.dev20240722.data}/scripts/streamlit.cmd +0 -0
- {streamlit_nightly-1.36.1.dev20240720.dist-info → streamlit_nightly-1.36.1.dev20240722.dist-info}/entry_points.txt +0 -0
- {streamlit_nightly-1.36.1.dev20240720.dist-info → streamlit_nightly-1.36.1.dev20240722.dist-info}/top_level.txt +0 -0
@@ -110,21 +110,26 @@ def rerun( # type: ignore[misc]
|
|
110
110
|
) -> NoReturn:
|
111
111
|
"""Rerun the script immediately.
|
112
112
|
|
113
|
-
When ``st.rerun()`` is called,
|
114
|
-
|
113
|
+
When ``st.rerun()`` is called, Streamlit halts the current script run and
|
114
|
+
executes no further statements. Streamlit immediately queues the script to
|
115
|
+
rerun.
|
116
|
+
|
117
|
+
When using ``st.rerun`` in a fragment, you can scope the rerun to the
|
118
|
+
fragment. However, if a fragment is running as part of a full-app rerun,
|
119
|
+
a fragment-scoped rerun is not allowed.
|
115
120
|
|
116
121
|
Parameters
|
117
122
|
----------
|
118
|
-
scope :
|
119
|
-
Specifies what part of the app should rerun.
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
123
|
+
scope : "app" or "fragment"
|
124
|
+
Specifies what part of the app should rerun. If ``scope`` is ``"app"``
|
125
|
+
(default), the full app reruns. If ``scope`` is ``"fragment"``,
|
126
|
+
Streamlit only reruns the fragment from which this command is called.
|
127
|
+
|
128
|
+
Setting ``scope="fragment"`` is only valid inside a fragment during a
|
129
|
+
fragment rerun. If ``st.rerun(scope="fragment")`` is called during a
|
130
|
+
full-app rerun or outside of a fragment, Streamlit will raise a
|
131
|
+
``StreamlitAPIException``.
|
132
|
+
|
128
133
|
"""
|
129
134
|
|
130
135
|
ctx = get_script_run_ctx()
|
streamlit/config.py
CHANGED
@@ -457,7 +457,7 @@ _create_option(
|
|
457
457
|
* "minimal" : Show only options set externally (e.g. through
|
458
458
|
Streamlit Community Cloud) or through st.set_page_config.
|
459
459
|
If there are no options left, hide the menu.
|
460
|
-
""",
|
460
|
+
""",
|
461
461
|
default_val="auto",
|
462
462
|
type_=str,
|
463
463
|
scriptable=True,
|
@@ -465,7 +465,11 @@ _create_option(
|
|
465
465
|
|
466
466
|
_create_option(
|
467
467
|
"client.showSidebarNavigation",
|
468
|
-
description="""
|
468
|
+
description="""
|
469
|
+
Controls whether to display the default sidebar page navigation in a
|
470
|
+
multi-page app. This only applies when app's pages are defined by the
|
471
|
+
`pages/` directory.
|
472
|
+
""",
|
469
473
|
default_val=True,
|
470
474
|
type_=bool,
|
471
475
|
scriptable=True,
|
@@ -480,7 +484,7 @@ _create_option(
|
|
480
484
|
description="""
|
481
485
|
Allows you to type a variable or string by itself in a single line of
|
482
486
|
Python code to write it to the app.
|
483
|
-
|
487
|
+
""",
|
484
488
|
default_val=True,
|
485
489
|
type_=bool,
|
486
490
|
)
|
@@ -492,7 +496,7 @@ _create_option(
|
|
492
496
|
can help avoid excess memory use in Streamlit apps, but could
|
493
497
|
introduce delay in rerunning the app script for high-memory-use
|
494
498
|
applications.
|
495
|
-
|
499
|
+
""",
|
496
500
|
default_val=True,
|
497
501
|
type_=bool,
|
498
502
|
visibility="hidden",
|
streamlit/elements/alert.py
CHANGED
@@ -47,7 +47,7 @@ class AlertMixin:
|
|
47
47
|
* A single-character emoji. For example, you can set ``icon="🚨"``
|
48
48
|
or ``icon="🔥"``. Emoji short codes are not supported.
|
49
49
|
|
50
|
-
* An icon from the Material Symbols library (
|
50
|
+
* An icon from the Material Symbols library (rounded style) in the
|
51
51
|
format ``":material/icon_name:"`` where "icon_name" is the name
|
52
52
|
of the icon in snake case.
|
53
53
|
|
@@ -97,7 +97,7 @@ class AlertMixin:
|
|
97
97
|
|
98
98
|
For example, ``icon=":material/thumb_up:"`` will display the
|
99
99
|
Thumb Up icon. Find additional icons in the `Material Symbols \
|
100
|
-
<https://fonts.google.com/icons?icon.set=Material+Symbols&icon.style=
|
100
|
+
<https://fonts.google.com/icons?icon.set=Material+Symbols&icon.style=Rounded>`_
|
101
101
|
font library.
|
102
102
|
|
103
103
|
Example
|
@@ -134,13 +134,13 @@ class AlertMixin:
|
|
134
134
|
* A single-character emoji. For example, you can set ``icon="🚨"``
|
135
135
|
or ``icon="🔥"``. Emoji short codes are not supported.
|
136
136
|
|
137
|
-
* An icon from the Material Symbols library (
|
137
|
+
* An icon from the Material Symbols library (rounded style) in the
|
138
138
|
format ``":material/icon_name:"`` where "icon_name" is the name
|
139
139
|
of the icon in snake case.
|
140
140
|
|
141
141
|
For example, ``icon=":material/thumb_up:"`` will display the
|
142
142
|
Thumb Up icon. Find additional icons in the `Material Symbols \
|
143
|
-
<https://fonts.google.com/icons?icon.set=Material+Symbols&icon.style=
|
143
|
+
<https://fonts.google.com/icons?icon.set=Material+Symbols&icon.style=Rounded>`_
|
144
144
|
font library.
|
145
145
|
|
146
146
|
Example
|
@@ -178,13 +178,13 @@ class AlertMixin:
|
|
178
178
|
* A single-character emoji. For example, you can set ``icon="🚨"``
|
179
179
|
or ``icon="🔥"``. Emoji short codes are not supported.
|
180
180
|
|
181
|
-
* An icon from the Material Symbols library (
|
181
|
+
* An icon from the Material Symbols library (rounded style) in the
|
182
182
|
format ``":material/icon_name:"`` where "icon_name" is the name
|
183
183
|
of the icon in snake case.
|
184
184
|
|
185
185
|
For example, ``icon=":material/thumb_up:"`` will display the
|
186
186
|
Thumb Up icon. Find additional icons in the `Material Symbols \
|
187
|
-
<https://fonts.google.com/icons?icon.set=Material+Symbols&icon.style=
|
187
|
+
<https://fonts.google.com/icons?icon.set=Material+Symbols&icon.style=Rounded>`_
|
188
188
|
font library.
|
189
189
|
|
190
190
|
Example
|
@@ -222,4 +222,5 @@ def experimental_dialog_decorator(title: F, *, width: DialogWidth = "small") ->
|
|
222
222
|
def experimental_dialog_decorator(
|
223
223
|
title: F | str, *, width: DialogWidth = "small"
|
224
224
|
) -> F | Callable[[F], F]:
|
225
|
+
"""Deprecated alias for @st.dialog. See the docstring for the decorator's new name."""
|
225
226
|
return dialog_decorator(title, width=width)
|
streamlit/elements/heading.py
CHANGED
@@ -54,25 +54,14 @@ class HeadingMixin:
|
|
54
54
|
Parameters
|
55
55
|
----------
|
56
56
|
body : str
|
57
|
-
The text to display as
|
57
|
+
The text to display as GitHub-flavored Markdown. Syntax
|
58
58
|
information can be found at: https://github.github.com/gfm.
|
59
59
|
|
60
|
-
|
60
|
+
See the ``body`` parameter of |st.markdown|_ for additional,
|
61
|
+
supported Markdown directives.
|
61
62
|
|
62
|
-
|
63
|
-
|
64
|
-
see https://share.streamlit.io/streamlit/emoji-shortcodes.
|
65
|
-
|
66
|
-
* LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"
|
67
|
-
must be on their own lines). Supported LaTeX functions are listed
|
68
|
-
at https://katex.org/docs/supported.html.
|
69
|
-
|
70
|
-
* Colored text and background colors for text, using the syntax
|
71
|
-
``:color[text to be colored]`` and ``:color-background[text to be colored]``,
|
72
|
-
respectively. ``color`` must be replaced with any of the following
|
73
|
-
supported colors: blue, green, orange, red, violet, gray/grey, rainbow.
|
74
|
-
For example, you can use ``:orange[your text here]`` or
|
75
|
-
``:blue-background[your text here]``.
|
63
|
+
.. |st.markdown| replace:: ``st.markdown``
|
64
|
+
.. _st.markdown: https://docs.streamlit.io/develop/api-reference/text/st.markdown
|
76
65
|
|
77
66
|
anchor : str or False
|
78
67
|
The anchor name of the header that can be accessed with #anchor
|
@@ -94,12 +83,17 @@ class HeadingMixin:
|
|
94
83
|
--------
|
95
84
|
>>> import streamlit as st
|
96
85
|
>>>
|
97
|
-
>>> st.header("This is a header with a divider", divider="rainbow")
|
98
86
|
>>> st.header("_Streamlit_ is :blue[cool] :sunglasses:")
|
87
|
+
>>> st.header("This is a header with a divider", divider="gray")
|
88
|
+
>>> st.header("These headers have rotating dividers", divider=True)
|
89
|
+
>>> st.header("One", divider=True)
|
90
|
+
>>> st.header("Two", divider=True)
|
91
|
+
>>> st.header("Three", divider=True)
|
92
|
+
>>> st.header("Four", divider=True)
|
99
93
|
|
100
94
|
.. output::
|
101
95
|
https://doc-header.streamlit.app/
|
102
|
-
height:
|
96
|
+
height: 600px
|
103
97
|
|
104
98
|
"""
|
105
99
|
return self.dg._enqueue(
|
@@ -127,25 +121,14 @@ class HeadingMixin:
|
|
127
121
|
Parameters
|
128
122
|
----------
|
129
123
|
body : str
|
130
|
-
The text to display as
|
124
|
+
The text to display as GitHub-flavored Markdown. Syntax
|
131
125
|
information can be found at: https://github.github.com/gfm.
|
132
126
|
|
133
|
-
|
134
|
-
|
135
|
-
* Emoji shortcodes, such as ``:+1:`` and ``:sunglasses:``.
|
136
|
-
For a list of all supported codes,
|
137
|
-
see https://share.streamlit.io/streamlit/emoji-shortcodes.
|
127
|
+
See the ``body`` parameter of |st.markdown|_ for additional,
|
128
|
+
supported Markdown directives.
|
138
129
|
|
139
|
-
|
140
|
-
|
141
|
-
at https://katex.org/docs/supported.html.
|
142
|
-
|
143
|
-
* Colored text and background colors for text, using the syntax
|
144
|
-
``:color[text to be colored]`` and ``:color-background[text to be colored]``,
|
145
|
-
respectively. ``color`` must be replaced with any of the following
|
146
|
-
supported colors: blue, green, orange, red, violet, gray/grey, rainbow.
|
147
|
-
For example, you can use ``:orange[your text here]`` or
|
148
|
-
``:blue-background[your text here]``.
|
130
|
+
.. |st.markdown| replace:: ``st.markdown``
|
131
|
+
.. _st.markdown: https://docs.streamlit.io/develop/api-reference/text/st.markdown
|
149
132
|
|
150
133
|
anchor : str or False
|
151
134
|
The anchor name of the header that can be accessed with #anchor
|
@@ -167,12 +150,17 @@ class HeadingMixin:
|
|
167
150
|
--------
|
168
151
|
>>> import streamlit as st
|
169
152
|
>>>
|
170
|
-
>>> st.subheader("This is a subheader with a divider", divider="rainbow")
|
171
153
|
>>> st.subheader("_Streamlit_ is :blue[cool] :sunglasses:")
|
154
|
+
>>> st.subheader("This is a subheader with a divider", divider="gray")
|
155
|
+
>>> st.subheader("These subheaders have rotating dividers", divider=True)
|
156
|
+
>>> st.subheader("One", divider=True)
|
157
|
+
>>> st.subheader("Two", divider=True)
|
158
|
+
>>> st.subheader("Three", divider=True)
|
159
|
+
>>> st.subheader("Four", divider=True)
|
172
160
|
|
173
161
|
.. output::
|
174
162
|
https://doc-subheader.streamlit.app/
|
175
|
-
height:
|
163
|
+
height: 500px
|
176
164
|
|
177
165
|
"""
|
178
166
|
return self.dg._enqueue(
|
@@ -202,25 +190,14 @@ class HeadingMixin:
|
|
202
190
|
Parameters
|
203
191
|
----------
|
204
192
|
body : str
|
205
|
-
The text to display as
|
193
|
+
The text to display as GitHub-flavored Markdown. Syntax
|
206
194
|
information can be found at: https://github.github.com/gfm.
|
207
195
|
|
208
|
-
|
209
|
-
|
210
|
-
* Emoji shortcodes, such as ``:+1:`` and ``:sunglasses:``.
|
211
|
-
For a list of all supported codes,
|
212
|
-
see https://share.streamlit.io/streamlit/emoji-shortcodes.
|
213
|
-
|
214
|
-
* LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"
|
215
|
-
must be on their own lines). Supported LaTeX functions are listed
|
216
|
-
at https://katex.org/docs/supported.html.
|
196
|
+
See the ``body`` parameter of |st.markdown|_ for additional,
|
197
|
+
supported Markdown directives.
|
217
198
|
|
218
|
-
|
219
|
-
|
220
|
-
respectively. ``color`` must be replaced with any of the following
|
221
|
-
supported colors: blue, green, orange, red, violet, gray/grey, rainbow.
|
222
|
-
For example, you can use ``:orange[your text here]`` or
|
223
|
-
``:blue-background[your text here]``.
|
199
|
+
.. |st.markdown| replace:: ``st.markdown``
|
200
|
+
.. _st.markdown: https://docs.streamlit.io/develop/api-reference/text/st.markdown
|
224
201
|
|
225
202
|
anchor : str or False
|
226
203
|
The anchor name of the header that can be accessed with #anchor
|
streamlit/elements/layouts.py
CHANGED
@@ -346,31 +346,21 @@ class LayoutsMixin:
|
|
346
346
|
Parameters
|
347
347
|
----------
|
348
348
|
tabs : list of str
|
349
|
-
Creates a tab for each string in the list. The first tab is selected
|
350
|
-
The string is used as the name of the tab and can
|
351
|
-
|
352
|
-
|
349
|
+
Creates a tab for each string in the list. The first tab is selected
|
350
|
+
by default. The string is used as the name of the tab and can
|
351
|
+
optionally contain GitHub-flavored Markdown of the following types:
|
352
|
+
Bold, Italics, Strikethroughs, Inline Code, and Links.
|
353
353
|
|
354
|
-
|
354
|
+
Unsupported Markdown elements are unwrapped so only their children
|
355
|
+
(text contents) render. Display unsupported elements as literal
|
356
|
+
characters by backslash-escaping them. E.g.,
|
357
|
+
``"1\. Not an ordered list"``.
|
355
358
|
|
356
|
-
|
357
|
-
|
358
|
-
see https://share.streamlit.io/streamlit/emoji-shortcodes.
|
359
|
+
See the ``body`` parameter of |st.markdown|_ for additional,
|
360
|
+
supported Markdown directives.
|
359
361
|
|
360
|
-
|
361
|
-
|
362
|
-
at https://katex.org/docs/supported.html.
|
363
|
-
|
364
|
-
* Colored text and background colors for text, using the syntax
|
365
|
-
``:color[text to be colored]`` and ``:color-background[text to be colored]``,
|
366
|
-
respectively. ``color`` must be replaced with any of the following
|
367
|
-
supported colors: blue, green, orange, red, violet, gray/grey, rainbow.
|
368
|
-
For example, you can use ``:orange[your text here]`` or
|
369
|
-
``:blue-background[your text here]``.
|
370
|
-
|
371
|
-
Unsupported elements are unwrapped so only their children (text contents) render.
|
372
|
-
Display unsupported elements as literal characters by
|
373
|
-
backslash-escaping them. E.g. ``1\. Not an ordered list``.
|
362
|
+
.. |st.markdown| replace:: ``st.markdown``
|
363
|
+
.. _st.markdown: https://docs.streamlit.io/develop/api-reference/text/st.markdown
|
374
364
|
|
375
365
|
Returns
|
376
366
|
-------
|
@@ -465,29 +455,19 @@ class LayoutsMixin:
|
|
465
455
|
----------
|
466
456
|
label : str
|
467
457
|
A string to use as the header for the expander. The label can optionally
|
468
|
-
contain Markdown
|
469
|
-
Strikethroughs, Inline Code,
|
470
|
-
|
471
|
-
This also supports:
|
458
|
+
contain GitHub-flavored Markdown of the following types: Bold, Italics,
|
459
|
+
Strikethroughs, Inline Code, and Links.
|
472
460
|
|
473
|
-
|
474
|
-
|
475
|
-
|
461
|
+
Unsupported Markdown elements are unwrapped so only their children
|
462
|
+
(text contents) render. Display unsupported elements as literal
|
463
|
+
characters by backslash-escaping them. E.g.,
|
464
|
+
``"1\. Not an ordered list"``.
|
476
465
|
|
477
|
-
|
478
|
-
|
479
|
-
at https://katex.org/docs/supported.html.
|
466
|
+
See the ``body`` parameter of |st.markdown|_ for additional,
|
467
|
+
supported Markdown directives.
|
480
468
|
|
481
|
-
|
482
|
-
|
483
|
-
respectively. ``color`` must be replaced with any of the following
|
484
|
-
supported colors: blue, green, orange, red, violet, gray/grey, rainbow.
|
485
|
-
For example, you can use ``:orange[your text here]`` or
|
486
|
-
``:blue-background[your text here]``.
|
487
|
-
|
488
|
-
Unsupported elements are unwrapped so only their children (text contents) render.
|
489
|
-
Display unsupported elements as literal characters by
|
490
|
-
backslash-escaping them. E.g. ``1\. Not an ordered list``.
|
469
|
+
.. |st.markdown| replace:: ``st.markdown``
|
470
|
+
.. _st.markdown: https://docs.streamlit.io/develop/api-reference/text/st.markdown
|
491
471
|
|
492
472
|
expanded : bool
|
493
473
|
If True, initializes the expander in "expanded" state. Defaults to
|
@@ -593,30 +573,20 @@ class LayoutsMixin:
|
|
593
573
|
----------
|
594
574
|
label : str
|
595
575
|
The label of the button that opens the popover container.
|
596
|
-
The label can optionally contain Markdown
|
597
|
-
following
|
598
|
-
|
599
|
-
|
600
|
-
This also supports:
|
576
|
+
The label can optionally contain GitHub-flavored Markdown of the
|
577
|
+
following types: Bold, Italics, Strikethroughs, Inline Code, and
|
578
|
+
Links.
|
601
579
|
|
602
|
-
|
603
|
-
|
604
|
-
|
580
|
+
Unsupported Markdown elements are unwrapped so only their children
|
581
|
+
(text contents) render. Display unsupported elements as literal
|
582
|
+
characters by backslash-escaping them. E.g.,
|
583
|
+
``"1\. Not an ordered list"``.
|
605
584
|
|
606
|
-
|
607
|
-
|
608
|
-
at https://katex.org/docs/supported.html.
|
585
|
+
See the ``body`` parameter of |st.markdown|_ for additional,
|
586
|
+
supported Markdown directives.
|
609
587
|
|
610
|
-
|
611
|
-
|
612
|
-
respectively. ``color`` must be replaced with any of the following
|
613
|
-
supported colors: blue, green, orange, red, violet, gray/grey, rainbow.
|
614
|
-
For example, you can use ``:orange[your text here]`` or
|
615
|
-
``:blue-background[your text here]``.
|
616
|
-
|
617
|
-
Unsupported elements are unwrapped so only their children (text contents) render.
|
618
|
-
Display unsupported elements as literal characters by
|
619
|
-
backslash-escaping them. E.g. ``1\. Not an ordered list``.
|
588
|
+
.. |st.markdown| replace:: ``st.markdown``
|
589
|
+
.. _st.markdown: https://docs.streamlit.io/develop/api-reference/text/st.markdown
|
620
590
|
|
621
591
|
help : str
|
622
592
|
An optional tooltip that gets displayed when the popover button is
|
@@ -671,6 +641,7 @@ class LayoutsMixin:
|
|
671
641
|
.. output ::
|
672
642
|
https://doc-popover2.streamlit.app/
|
673
643
|
height: 400px
|
644
|
+
|
674
645
|
"""
|
675
646
|
if label is None:
|
676
647
|
raise StreamlitAPIException("A label is required for a popover")
|
@@ -717,29 +688,19 @@ class LayoutsMixin:
|
|
717
688
|
|
718
689
|
label : str
|
719
690
|
The initial label of the status container. The label can optionally
|
720
|
-
contain Markdown
|
721
|
-
|
722
|
-
|
723
|
-
This also supports:
|
724
|
-
|
725
|
-
* Emoji shortcodes, such as ``:+1:`` and ``:sunglasses:``.
|
726
|
-
For a list of all supported codes,
|
727
|
-
see https://share.streamlit.io/streamlit/emoji-shortcodes.
|
691
|
+
contain GitHub-flavored Markdown of the following types: Bold, Italics,
|
692
|
+
Strikethroughs, Inline Code, and Links.
|
728
693
|
|
729
|
-
|
730
|
-
|
731
|
-
|
694
|
+
Unsupported Markdown elements are unwrapped so only their children
|
695
|
+
(text contents) render. Display unsupported elements as literal
|
696
|
+
characters by backslash-escaping them. E.g.,
|
697
|
+
``"1\. Not an ordered list"``.
|
732
698
|
|
733
|
-
|
734
|
-
|
735
|
-
respectively. ``color`` must be replaced with any of the following
|
736
|
-
supported colors: blue, green, orange, red, violet, gray/grey, rainbow.
|
737
|
-
For example, you can use ``:orange[your text here]`` or
|
738
|
-
``:blue-background[your text here]``.
|
699
|
+
See the ``body`` parameter of |st.markdown|_ for additional,
|
700
|
+
supported Markdown directives.
|
739
701
|
|
740
|
-
|
741
|
-
|
742
|
-
backslash-escaping them. E.g. ``1\. Not an ordered list``.
|
702
|
+
.. |st.markdown| replace:: ``st.markdown``
|
703
|
+
.. _st.markdown: https://docs.streamlit.io/develop/api-reference/text/st.markdown
|
743
704
|
|
744
705
|
expanded : bool
|
745
706
|
If True, initializes the status container in "expanded" state. Defaults to
|
streamlit/elements/markdown.py
CHANGED
@@ -43,7 +43,7 @@ class MarkdownMixin:
|
|
43
43
|
Parameters
|
44
44
|
----------
|
45
45
|
body : str
|
46
|
-
The string to display as
|
46
|
+
The string to display as GitHub-flavored Markdown. Syntax
|
47
47
|
information can be found at: https://github.github.com/gfm.
|
48
48
|
|
49
49
|
This also supports:
|
@@ -52,6 +52,12 @@ class MarkdownMixin:
|
|
52
52
|
For a list of all supported codes,
|
53
53
|
see https://share.streamlit.io/streamlit/emoji-shortcodes.
|
54
54
|
|
55
|
+
* Google Material Symbols (rounded style), using the syntax
|
56
|
+
``:material/icon_name:``, where "icon_name" is the name of the
|
57
|
+
icon in snake case. For a complete list of icons, see Google's
|
58
|
+
`Material Symbols <https://fonts.google.com/icons?icon.set=Material+Symbols&icon.style=Rounded>`_
|
59
|
+
font library.
|
60
|
+
|
55
61
|
* LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"
|
56
62
|
must be on their own lines). Supported LaTeX functions are listed
|
57
63
|
at https://katex.org/docs/supported.html.
|
@@ -166,25 +172,14 @@ class MarkdownMixin:
|
|
166
172
|
Parameters
|
167
173
|
----------
|
168
174
|
body : str
|
169
|
-
The text to display as
|
175
|
+
The text to display as GitHub-flavored Markdown. Syntax
|
170
176
|
information can be found at: https://github.github.com/gfm.
|
171
177
|
|
172
|
-
|
173
|
-
|
174
|
-
* Emoji shortcodes, such as ``:+1:`` and ``:sunglasses:``.
|
175
|
-
For a list of all supported codes,
|
176
|
-
see https://share.streamlit.io/streamlit/emoji-shortcodes.
|
177
|
-
|
178
|
-
* LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"
|
179
|
-
must be on their own lines). Supported LaTeX functions are listed
|
180
|
-
at https://katex.org/docs/supported.html.
|
178
|
+
See the ``body`` parameter of |st.markdown|_ for additional,
|
179
|
+
supported Markdown directives.
|
181
180
|
|
182
|
-
|
183
|
-
|
184
|
-
respectively. ``color`` must be replaced with any of the following
|
185
|
-
supported colors: blue, green, orange, red, violet, gray/grey, rainbow.
|
186
|
-
For example, you can use ``:orange[your text here]`` or
|
187
|
-
``:blue-background[your text here]``.
|
181
|
+
.. |st.markdown| replace:: ``st.markdown``
|
182
|
+
.. _st.markdown: https://docs.streamlit.io/develop/api-reference/text/st.markdown
|
188
183
|
|
189
184
|
unsafe_allow_html : bool
|
190
185
|
Whether to render HTML within ``body``. If this is ``False``
|
streamlit/elements/metric.py
CHANGED
@@ -68,46 +68,41 @@ class MetricMixin:
|
|
68
68
|
Parameters
|
69
69
|
----------
|
70
70
|
label : str
|
71
|
-
The header or title for the metric. The label can optionally
|
72
|
-
Markdown
|
73
|
-
Strikethroughs, Inline Code,
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
``:color[text to be colored]`` and ``:color-background[text to be colored]``,
|
87
|
-
respectively. ``color`` must be replaced with any of the following
|
88
|
-
supported colors: blue, green, orange, red, violet, gray/grey, rainbow.
|
89
|
-
For example, you can use ``:orange[your text here]`` or
|
90
|
-
``:blue-background[your text here]``.
|
91
|
-
|
92
|
-
Unsupported elements are unwrapped so only their children (text contents) render.
|
93
|
-
Display unsupported elements as literal characters by
|
94
|
-
backslash-escaping them. E.g. ``1\. Not an ordered list``.
|
71
|
+
The header or title for the metric. The label can optionally
|
72
|
+
contain GitHub-flavored Markdown of the following types: Bold, Italics,
|
73
|
+
Strikethroughs, Inline Code, and Links.
|
74
|
+
|
75
|
+
Unsupported Markdown elements are unwrapped so only their children
|
76
|
+
(text contents) render. Display unsupported elements as literal
|
77
|
+
characters by backslash-escaping them. E.g.,
|
78
|
+
``"1\. Not an ordered list"``.
|
79
|
+
|
80
|
+
See the ``body`` parameter of |st.markdown|_ for additional,
|
81
|
+
supported Markdown directives.
|
82
|
+
|
83
|
+
.. |st.markdown| replace:: ``st.markdown``
|
84
|
+
.. _st.markdown: https://docs.streamlit.io/develop/api-reference/text/st.markdown
|
85
|
+
|
95
86
|
value : int, float, str, or None
|
96
87
|
Value of the metric. None is rendered as a long dash.
|
88
|
+
|
97
89
|
delta : int, float, str, or None
|
98
90
|
Indicator of how the metric changed, rendered with an arrow below
|
99
91
|
the metric. If delta is negative (int/float) or starts with a minus
|
100
92
|
sign (str), the arrow points down and the text is red; else the
|
101
93
|
arrow points up and the text is green. If None (default), no delta
|
102
94
|
indicator is shown.
|
95
|
+
|
103
96
|
delta_color : "normal", "inverse", or "off"
|
104
97
|
If "normal" (default), the delta indicator is shown as described
|
105
98
|
above. If "inverse", it is red when positive and green when
|
106
99
|
negative. This is useful when a negative change is considered
|
107
100
|
good, e.g. if cost decreased. If "off", delta is shown in gray
|
108
101
|
regardless of its value.
|
102
|
+
|
109
103
|
help : str
|
110
104
|
An optional tooltip that gets displayed next to the metric label.
|
105
|
+
|
111
106
|
label_visibility : "visible", "hidden", or "collapsed"
|
112
107
|
The visibility of the label. If "hidden", the label doesn't show but there
|
113
108
|
is still empty space for it (equivalent to label="").
|
streamlit/elements/progress.py
CHANGED
@@ -104,29 +104,19 @@ class ProgressMixin:
|
|
104
104
|
|
105
105
|
text : str or None
|
106
106
|
A message to display above the progress bar. The text can optionally
|
107
|
-
contain Markdown
|
108
|
-
Strikethroughs, Inline Code,
|
107
|
+
contain GitHub-flavored Markdown of the following types: Bold, Italics,
|
108
|
+
Strikethroughs, Inline Code, and Links.
|
109
109
|
|
110
|
-
|
110
|
+
Unsupported Markdown elements are unwrapped so only their children
|
111
|
+
(text contents) render. Display unsupported elements as literal
|
112
|
+
characters by backslash-escaping them. E.g.,
|
113
|
+
``"1\. Not an ordered list"``.
|
111
114
|
|
112
|
-
|
113
|
-
|
114
|
-
see https://share.streamlit.io/streamlit/emoji-shortcodes.
|
115
|
+
See the ``body`` parameter of |st.markdown|_ for additional,
|
116
|
+
supported Markdown directives.
|
115
117
|
|
116
|
-
|
117
|
-
|
118
|
-
at https://katex.org/docs/supported.html.
|
119
|
-
|
120
|
-
* Colored text and background colors for text, using the syntax
|
121
|
-
``:color[text to be colored]`` and ``:color-background[text to be colored]``,
|
122
|
-
respectively. ``color`` must be replaced with any of the following
|
123
|
-
supported colors: blue, green, orange, red, violet, gray/grey, rainbow.
|
124
|
-
For example, you can use ``:orange[your text here]`` or
|
125
|
-
``:blue-background[your text here]``.
|
126
|
-
|
127
|
-
Unsupported elements are unwrapped so only their children (text contents) render.
|
128
|
-
Display unsupported elements as literal characters by
|
129
|
-
backslash-escaping them. E.g. ``1\. Not an ordered list``.
|
118
|
+
.. |st.markdown| replace:: ``st.markdown``
|
119
|
+
.. _st.markdown: https://docs.streamlit.io/develop/api-reference/text/st.markdown
|
130
120
|
|
131
121
|
Example
|
132
122
|
-------
|