diff --git a/lib/streamlit/elements/bokeh_chart.py b/lib/streamlit/elements/bokeh_chart.py index 0a6f67a60ecf..dc29eef0a994 100644 --- a/lib/streamlit/elements/bokeh_chart.py +++ b/lib/streamlit/elements/bokeh_chart.py @@ -71,7 +71,7 @@ def bokeh_chart( >>> st.bokeh_chart(p, use_container_width=True) .. output:: - https://share.streamlit.io/streamlit/docs/main/python/api-examples-source/charts.bokeh_chart.py + https://doc-bokeh-chart.streamlitapp.com/ height: 700px """ diff --git a/lib/streamlit/elements/button.py b/lib/streamlit/elements/button.py index e0fbd62b8922..df4dde3f6b5a 100644 --- a/lib/streamlit/elements/button.py +++ b/lib/streamlit/elements/button.py @@ -97,7 +97,7 @@ def button( ... st.write('Goodbye') .. output:: - https://share.streamlit.io/streamlit/docs/main/python/api-examples-source/widget.button.py + https://doc-buton.streamlitapp.com/ height: 220px """ @@ -219,7 +219,7 @@ def download_button( ... ) .. output:: - https://share.streamlit.io/streamlit/docs/main/python/api-examples-source/widget.download_button.py + https://doc-download-buton.streamlitapp.com/ height: 335px """ diff --git a/lib/streamlit/elements/checkbox.py b/lib/streamlit/elements/checkbox.py index 6416a9e8fa8c..d974a382feb2 100644 --- a/lib/streamlit/elements/checkbox.py +++ b/lib/streamlit/elements/checkbox.py @@ -84,7 +84,7 @@ def checkbox( ... st.write('Great!') .. output:: - https://share.streamlit.io/streamlit/docs/main/python/api-examples-source/widget.checkbox.py + https://doc-checkbox.streamlitapp.com/ height: 220px """ diff --git a/lib/streamlit/elements/color_picker.py b/lib/streamlit/elements/color_picker.py index a8e62ea14b86..ea4d91a84482 100644 --- a/lib/streamlit/elements/color_picker.py +++ b/lib/streamlit/elements/color_picker.py @@ -83,7 +83,7 @@ def color_picker( >>> st.write('The current color is', color) .. output:: - https://share.streamlit.io/streamlit/docs/main/python/api-examples-source/widget.color_picker.py + https://doc-color-picker.streamlitapp.com/ height: 335px """ diff --git a/lib/streamlit/elements/dataframe_selector.py b/lib/streamlit/elements/dataframe_selector.py index 327455c144b2..107cd5117816 100644 --- a/lib/streamlit/elements/dataframe_selector.py +++ b/lib/streamlit/elements/dataframe_selector.py @@ -72,7 +72,7 @@ def dataframe( >>> st.dataframe(df) # Same as st.write(df) .. output:: - https://share.streamlit.io/streamlit/docs/main/python/api-examples-source/data.dataframe.py + https://doc-dataframe.streamlitapp.com/ height: 410px >>> st.dataframe(df, 200, 100) @@ -87,7 +87,7 @@ def dataframe( >>> st.dataframe(df.style.highlight_max(axis=0)) .. output:: - https://share.streamlit.io/streamlit/docs/main/python/api-examples-source/data.dataframe1.py + https://doc-dataframe1.streamlitapp.com/ height: 410px """ @@ -120,7 +120,7 @@ def table(self, data: "Data" = None) -> "DeltaGenerator": >>> st.table(df) .. output:: - https://share.streamlit.io/streamlit/docs/main/python/api-examples-source/data.table.py + https://doc-table.streamlitapp.com/ height: 480px """ @@ -174,7 +174,7 @@ def line_chart( >>> st.line_chart(chart_data) .. output:: - https://share.streamlit.io/streamlit/docs/main/python/api-examples-source/charts.line_chart.py + https://doc-line-chart.streamlitapp.com/ height: 400px """ @@ -228,7 +228,7 @@ def area_chart( >>> st.area_chart(chart_data) .. output:: - https://share.streamlit.io/streamlit/docs/main/python/api-examples-source/charts.area_chart.py + https://doc-area-chart.streamlitapp.com/ height: 400px """ @@ -282,7 +282,7 @@ def bar_chart( >>> st.bar_chart(chart_data) .. output:: - https://share.streamlit.io/streamlit/docs/main/python/api-examples-source/charts.bar_chart.py + https://doc-bar-chart.streamlitapp.com/ height: 400px """ @@ -328,7 +328,7 @@ def altair_chart( https://altair-viz.github.io/gallery/. .. output:: - https://share.streamlit.io/streamlit/docs/main/python/api-examples-source/charts.vega_lite_chart.py + https://doc-vega-lite-chart.streamlitapp.com/ height: 300px """ @@ -390,7 +390,7 @@ def vega_lite_chart( ... }) .. output:: - https://share.streamlit.io/streamlit/docs/main/python/api-examples-source/charts.vega_lite_chart.py + https://doc-vega-lite-chart.streamlitapp.com/ height: 300px Examples of Vega-Lite usage without Streamlit can be found at diff --git a/lib/streamlit/elements/file_uploader.py b/lib/streamlit/elements/file_uploader.py index c89a544780a4..50d313bc7198 100644 --- a/lib/streamlit/elements/file_uploader.py +++ b/lib/streamlit/elements/file_uploader.py @@ -230,7 +230,7 @@ def file_uploader( ... st.write(bytes_data) .. output:: - https://share.streamlit.io/streamlit/docs/main/python/api-examples-source/widget.file_uploader.py + https://doc-file-uploader.streamlitapp.com/ height: 375px """ diff --git a/lib/streamlit/elements/graphviz_chart.py b/lib/streamlit/elements/graphviz_chart.py index b843f1b8c3b0..59f6f7567f5c 100644 --- a/lib/streamlit/elements/graphviz_chart.py +++ b/lib/streamlit/elements/graphviz_chart.py @@ -85,7 +85,7 @@ def graphviz_chart(self, figure_or_dot, use_container_width=False): ''') .. output:: - https://share.streamlit.io/streamlit/docs/main/python/api-examples-source/charts.graphviz_chart.py + https://doc-graphviz-chart.streamlitapp.com/ height: 600px """ diff --git a/lib/streamlit/elements/image.py b/lib/streamlit/elements/image.py index c756f4370658..e0096b3b92f1 100644 --- a/lib/streamlit/elements/image.py +++ b/lib/streamlit/elements/image.py @@ -120,7 +120,7 @@ def image( >>> st.image(image, caption='Sunrise by the mountains') .. output:: - https://share.streamlit.io/streamlit/docs/main/python/api-examples-source/charts.image.py + https://doc-image.streamlitapp.com/ height: 710px """ diff --git a/lib/streamlit/elements/json.py b/lib/streamlit/elements/json.py index 63ea8a805bce..9d06c586594b 100644 --- a/lib/streamlit/elements/json.py +++ b/lib/streamlit/elements/json.py @@ -59,7 +59,7 @@ def json( ... }) .. output:: - https://share.streamlit.io/streamlit/docs/main/python/api-examples-source/data.json.py + https://doc-json.streamlitapp.com/ height: 385px """ diff --git a/lib/streamlit/elements/layouts.py b/lib/streamlit/elements/layouts.py index 5cf3d076940f..6b78e8a92940 100644 --- a/lib/streamlit/elements/layouts.py +++ b/lib/streamlit/elements/layouts.py @@ -50,7 +50,7 @@ def container(self) -> "DeltaGenerator": >>> st.write("This is outside the container") .. output :: - https://share.streamlit.io/streamlit/docs/main/python/api-examples-source/layout.container1.py + https://doc-container1.streamlitapp.com/ height: 520px Inserting elements out of order: @@ -63,7 +63,7 @@ def container(self) -> "DeltaGenerator": >>> container.write("This is inside too") .. output :: - https://share.streamlit.io/streamlit/docs/main/python/api-examples-source/layout.container2.py + https://doc-container2.streamlitapp.com/ height: 480px """ return self.dg._block() @@ -129,7 +129,7 @@ def columns( ... st.image("https://static.streamlit.io/examples/owl.jpg") .. output :: - https://share.streamlit.io/streamlit/docs/main/python/api-examples-source/layout.columns1.py + https://doc-columns1.streamlitapp.com/ height: 620px Or you can just call methods directly in the returned objects: @@ -144,7 +144,7 @@ def columns( >>> col2.write(data) .. output :: - https://share.streamlit.io/streamlit/docs/main/python/api-examples-source/layout.columns2.py + https://doc-columns2.streamlitapp.com/ height: 550px """ @@ -239,8 +239,8 @@ def tabs(self, tabs: Sequence[str]) -> Sequence["DeltaGenerator"]: ... st.image("https://static.streamlit.io/examples/owl.jpg", width=200) .. output :: - https://share.streamlit.io/streamlit/docs/main/python/api-examples-source/layout.tabs1.py - height: 700px + https://doc-tabs1.streamlitapp.com/ + height: 620px Or you can just call methods directly in the returned objects: @@ -255,7 +255,7 @@ def tabs(self, tabs: Sequence[str]) -> Sequence["DeltaGenerator"]: .. output :: - https://share.streamlit.io/streamlit/docs/main/python/api-examples-source/layout.tabs2.py + https://doc-tabs2.streamlitapp.com/ height: 700px """ @@ -318,7 +318,7 @@ def expander(self, label: str, expanded: bool = False) -> "DeltaGenerator": ... st.image("https://static.streamlit.io/examples/dice.jpg") .. output :: - https://share.streamlit.io/streamlit/docs/main/python/api-examples-source/layout.expander.py + https://doc-expander.streamlitapp.com/ height: 750px Or you can just call methods directly in the returned objects: @@ -334,7 +334,7 @@ def expander(self, label: str, expanded: bool = False) -> "DeltaGenerator": >>> expander.image("https://static.streamlit.io/examples/dice.jpg") .. output :: - https://share.streamlit.io/streamlit/docs/main/python/api-examples-source/layout.expander.py + https://doc-expander.streamlitapp.com/ height: 750px """ diff --git a/lib/streamlit/elements/map.py b/lib/streamlit/elements/map.py index ebc797fb4ff1..09f9bc1fde3b 100644 --- a/lib/streamlit/elements/map.py +++ b/lib/streamlit/elements/map.py @@ -66,7 +66,7 @@ def map(self, data=None, zoom=None, use_container_width=True): >>> st.map(df) .. output:: - https://share.streamlit.io/streamlit/docs/main/python/api-examples-source/charts.map.py + https://doc-map.streamlitapp.com/ height: 650px """ diff --git a/lib/streamlit/elements/media.py b/lib/streamlit/elements/media.py index 68838fb7a645..b70acbc60152 100644 --- a/lib/streamlit/elements/media.py +++ b/lib/streamlit/elements/media.py @@ -67,7 +67,7 @@ def audio( >>> st.audio(audio_bytes, format='audio/ogg') .. output:: - https://share.streamlit.io/streamlit/docs/main/python/api-examples-source/charts.audio.py + https://doc-audio.streamlitapp.com/ height: 465px """ @@ -106,7 +106,7 @@ def video( >>> st.video(video_bytes) .. output:: - https://share.streamlit.io/streamlit/docs/main/python/api-examples-source/charts.video.py + https://doc-video.streamlitapp.com/ height: 700px .. note:: diff --git a/lib/streamlit/elements/metric.py b/lib/streamlit/elements/metric.py index 16c667773120..486fe6bf80ab 100644 --- a/lib/streamlit/elements/metric.py +++ b/lib/streamlit/elements/metric.py @@ -81,7 +81,7 @@ def metric( >>> st.metric(label="Temperature", value="70 °F", delta="1.2 °F") .. output:: - https://share.streamlit.io/streamlit/docs/main/python/api-examples-source/metric.example1.py + https://doc-metric-example1.streamlitapp.com/ height: 210px ``st.metric`` looks especially nice in combination with ``st.columns``: @@ -92,7 +92,7 @@ def metric( >>> col3.metric("Humidity", "86%", "4%") .. output:: - https://share.streamlit.io/streamlit/docs/main/python/api-examples-source/metric.example2.py + https://doc-metric-example2.streamlitapp.com/ height: 210px The delta indicator color can also be inverted or turned off: @@ -104,7 +104,7 @@ def metric( ... delta_color="off") .. output:: - https://share.streamlit.io/streamlit/docs/main/python/api-examples-source/metric.example3.py + https://doc-metric-example3.streamlitapp.com/ height: 320px """ diff --git a/lib/streamlit/elements/multiselect.py b/lib/streamlit/elements/multiselect.py index 2f1aaf68a1b6..372a9f8ab3e7 100644 --- a/lib/streamlit/elements/multiselect.py +++ b/lib/streamlit/elements/multiselect.py @@ -106,7 +106,7 @@ def multiselect( >>> st.write('You selected:', options) .. output:: - https://share.streamlit.io/streamlit/docs/main/python/api-examples-source/widget.multiselect.py + https://doc-multiselect.streamlitapp.com/ height: 420px """ diff --git a/lib/streamlit/elements/number_input.py b/lib/streamlit/elements/number_input.py index d1b6024376c3..9d8dc60ba31c 100644 --- a/lib/streamlit/elements/number_input.py +++ b/lib/streamlit/elements/number_input.py @@ -105,7 +105,7 @@ def number_input( >>> st.write('The current number is ', number) .. output:: - https://share.streamlit.io/streamlit/docs/main/python/api-examples-source/widget.number_input.py + https://doc-number-input.streamlitapp.com/ height: 260px """ diff --git a/lib/streamlit/elements/plotly_chart.py b/lib/streamlit/elements/plotly_chart.py index ebdd761de350..b6056484ba50 100644 --- a/lib/streamlit/elements/plotly_chart.py +++ b/lib/streamlit/elements/plotly_chart.py @@ -128,7 +128,7 @@ def plotly_chart( >>> st.plotly_chart(fig, use_container_width=True) .. output:: - https://share.streamlit.io/streamlit/docs/main/python/api-examples-source/charts.plotly_chart.py + https://doc-plotly-chart.streamlitapp.com/ height: 400px """ diff --git a/lib/streamlit/elements/pyplot.py b/lib/streamlit/elements/pyplot.py index d0719d46da84..677dc004fa9a 100644 --- a/lib/streamlit/elements/pyplot.py +++ b/lib/streamlit/elements/pyplot.py @@ -63,7 +63,7 @@ def pyplot(self, fig=None, clear_figure=None, **kwargs): >>> st.pyplot(fig) .. output:: - https://share.streamlit.io/streamlit/docs/main/python/api-examples-source/charts.pyplot.py + https://doc-pyplot.streamlitapp.com/ height: 630px Notes diff --git a/lib/streamlit/elements/radio.py b/lib/streamlit/elements/radio.py index 2390c7ecc713..82655de7f61f 100644 --- a/lib/streamlit/elements/radio.py +++ b/lib/streamlit/elements/radio.py @@ -102,7 +102,7 @@ def radio( ... st.write("You didn\'t select comedy.") .. output:: - https://share.streamlit.io/streamlit/docs/main/python/api-examples-source/widget.radio.py + https://doc-radio.streamlitapp.com/ height: 260px """ diff --git a/lib/streamlit/elements/select_slider.py b/lib/streamlit/elements/select_slider.py index 70a9640ef7aa..abd13383e258 100644 --- a/lib/streamlit/elements/select_slider.py +++ b/lib/streamlit/elements/select_slider.py @@ -114,7 +114,7 @@ def select_slider( >>> st.write('You selected wavelengths between', start_color, 'and', end_color) .. output:: - https://share.streamlit.io/streamlit/docs/main/python/api-examples-source/widget.select_slider.py + https://doc-select-slider.streamlitapp.com/ height: 450px """ diff --git a/lib/streamlit/elements/selectbox.py b/lib/streamlit/elements/selectbox.py index 50a70d00e87b..10ca14c98a89 100644 --- a/lib/streamlit/elements/selectbox.py +++ b/lib/streamlit/elements/selectbox.py @@ -91,7 +91,7 @@ def selectbox( >>> st.write('You selected:', option) .. output:: - https://share.streamlit.io/streamlit/docs/main/python/api-examples-source/widget.selectbox.py + https://doc-selectbox.streamlitapp.com/ height: 320px """ diff --git a/lib/streamlit/elements/slider.py b/lib/streamlit/elements/slider.py index b7abc600838a..b33792753035 100644 --- a/lib/streamlit/elements/slider.py +++ b/lib/streamlit/elements/slider.py @@ -144,7 +144,7 @@ def slider( >>> st.write("Start time:", start_time) .. output:: - https://share.streamlit.io/streamlit/docs/main/python/api-examples-source/widget.slider.py + https://doc-slider.streamlitapp.com/ height: 300px """ diff --git a/lib/streamlit/elements/text_widgets.py b/lib/streamlit/elements/text_widgets.py index e6ecd8eb2e11..2369af1578d8 100644 --- a/lib/streamlit/elements/text_widgets.py +++ b/lib/streamlit/elements/text_widgets.py @@ -101,7 +101,7 @@ def text_input( >>> st.write('The current movie title is', title) .. output:: - https://share.streamlit.io/streamlit/docs/main/python/api-examples-source/widget.text_input.py + https://doc-text-input.streamlitapp.com/ height: 260px """ diff --git a/lib/streamlit/elements/time_widgets.py b/lib/streamlit/elements/time_widgets.py index a050b696a6b7..2b332d94862b 100644 --- a/lib/streamlit/elements/time_widgets.py +++ b/lib/streamlit/elements/time_widgets.py @@ -211,7 +211,7 @@ def time_input( >>> st.write('Alarm is set for', t) .. output:: - https://share.streamlit.io/streamlit/docs/main/python/api-examples-source/widget.time_input.py + https://doc-time-input.streamlitapp.com/ height: 260px """ @@ -362,7 +362,7 @@ def date_input( >>> st.write('Your birthday is:', d) .. output:: - https://share.streamlit.io/streamlit/docs/main/python/api-examples-source/widget.date_input.py + https://doc-date-input.streamlitapp.com/ height: 260px """ diff --git a/lib/streamlit/elements/write.py b/lib/streamlit/elements/write.py index 45d4669f59e2..596cd4297bab 100644 --- a/lib/streamlit/elements/write.py +++ b/lib/streamlit/elements/write.py @@ -108,7 +108,7 @@ def write(self, *args: Any, **kwargs: Any) -> None: >>> write('Hello, *World!* :sunglasses:') .. output:: - https://share.streamlit.io/streamlit/docs/main/python/api-examples-source/text.write1.py + https://doc-write1.streamlitapp.com/ height: 150px As mentioned earlier, `st.write()` also accepts other data formats, such as @@ -121,7 +121,7 @@ def write(self, *args: Any, **kwargs: Any) -> None: ... })) .. output:: - https://share.streamlit.io/streamlit/docs/main/python/api-examples-source/text.write2.py + https://doc-write2.streamlitapp.com/ height: 350px Finally, you can pass in multiple arguments to do things like: @@ -130,7 +130,7 @@ def write(self, *args: Any, **kwargs: Any) -> None: >>> st.write('Below is a DataFrame:', data_frame, 'Above is a dataframe.') .. output:: - https://share.streamlit.io/streamlit/docs/main/python/api-examples-source/text.write3.py + https://doc-write3.streamlitapp.com/ height: 410px Oh, one more thing: `st.write` accepts chart objects too! For example: @@ -149,7 +149,7 @@ def write(self, *args: Any, **kwargs: Any) -> None: >>> st.write(c) .. output:: - https://share.streamlit.io/streamlit/docs/main/python/api-examples-source/charts.vega_lite_chart.py + https://doc-vega-lite-chart.streamlitapp.com/ height: 300px """