From 5295c25804d4a8689b0d0a301ad4fd50db17923f Mon Sep 17 00:00:00 2001 From: Thiago Teixeira Date: Mon, 15 Sep 2025 21:38:09 -0300 Subject: [PATCH 1/4] Add generate_llms_txt.py to make `llms.txt` Also removes `generate_content_catalog.py` since that's no longer needed for the AI assistant demo (https://demo-ai-assistant.streamlit.app/). --- content/menu.md | 368 +++++++++++++++++++++++++++++ makefile | 6 +- public/llms-full.txt | 1 - public/llms.txt | 1 + python/generate_content_catalog.py | 84 ------- python/generate_llms_txt.py | 116 +++++++++ 6 files changed, 490 insertions(+), 86 deletions(-) create mode 100644 public/llms.txt delete mode 100644 python/generate_content_catalog.py create mode 100644 python/generate_llms_txt.py diff --git a/content/menu.md b/content/menu.md index 2ab7bff88..3c6bdd486 100644 --- a/content/menu.md +++ b/content/menu.md @@ -2,970 +2,1338 @@ site_menu: - category: Get started url: /get-started + description: color: orange-70 icon: rocket_launch - category: Get started / Installation url: /get-started/installation + description: It's just `pip install streamlit`. But read for more details and alternatives. - category: Get started / Installation / Use command line url: /get-started/installation/command-line + description: - category: Get started / Installation / Use Anaconda Distribution url: /get-started/installation/anaconda-distribution + description: - category: Get started / Installation / Use GitHub Codespaces url: /get-started/installation/community-cloud + description: - category: Get started / Installation / Use Snowflake url: /get-started/installation/streamlit-in-snowflake + description: - category: Get started / Fundamentals url: /get-started/fundamentals + description: - category: Get started / Fundamentals / Basic concepts url: /get-started/fundamentals/main-concepts + description: - category: Get started / Fundamentals / Advanced concepts url: /get-started/fundamentals/advanced-concepts + description: - category: Get started / Fundamentals / Additional features url: /get-started/fundamentals/additional-features + description: - category: Get started / Fundamentals / Summary url: /get-started/fundamentals/summary + description: - category: Get started / First steps url: /get-started/tutorials + description: - category: Get started / First steps / Create an app url: /get-started/tutorials/create-an-app + description: - category: Get started / First steps / Create a multipage app url: /get-started/tutorials/create-a-multipage-app + description: - category: Develop url: /develop + description: All the information you need to build beautiful, performant web apps with Streamlit. color: indigo-70 icon: code - category: Develop / Concepts url: /develop/concepts + description: - category: Develop / Concepts / CORE - category: Develop / Concepts / Architecture and execution url: /develop/concepts/architecture + description: Understand how to start your Streamlit app. Understand Streamlit's client-server architecture and related considerations. - category: Develop / Concepts / Architecture and execution / Running your app url: /develop/concepts/architecture/run-your-app + description: - category: Develop / Concepts / Architecture and execution / Streamlit's architecture url: /develop/concepts/architecture/architecture + description: Streamlit apps have a client-server structure. The Python backend of your app is the server. The frontend you view through a browser is the client. - category: Develop / Concepts / Architecture and execution / The app chrome url: /develop/concepts/architecture/app-chrome + description: Explains the widgets in the top right of your Streamlit app. These widgets help you in development, and also help your viewers as they use your app. - category: Develop / Concepts / Architecture and execution / Caching url: /develop/concepts/architecture/caching + description: Use `@st.cache_resource` and `@st.cache_data` to speed up your app. - category: Develop / Concepts / Architecture and execution / Session State url: /develop/concepts/architecture/session-state + description: Use session state to store data that persists across app reruns during a user's session. (A session is connected to a browser tab) - category: Develop / Concepts / Architecture and execution / Forms url: /develop/concepts/architecture/forms + description: Use `st.form` when you don't want to rerun your script with every input made by a user. - category: Develop / Concepts / Architecture and execution / Fragments url: /develop/concepts/architecture/fragments + description: Use `st.fragment` to rerun only a subsection of your app when a user interacts, or on a timer. - category: Develop / Concepts / Architecture and execution/ Widget behavior url: /develop/concepts/architecture/widget-behavior + description: Learn about widgets (like `st.button`, `st.selectbox`, and `st.text_input`), which are at the heart of Streamlit apps. - category: Develop / Concepts / Multipage apps url: /develop/concepts/multipage-apps + description: - category: Develop / Concepts / Multipage apps / Overview url: /develop/concepts/multipage-apps/overview + description: Streamlit provides two built-in mechanisms for creating multipage apps. `st.navigation` and the `pages/` directory. - category: Develop / Concepts / Multipage apps / Page and navigation url: /develop/concepts/multipage-apps/page-and-navigation + description: Describes how to use `st.Page` and `st.navigation` to define multipage apps. This is the preferred method. - category: Develop / Concepts / Multipage apps / Pages directory url: /develop/concepts/multipage-apps/pages-directory + description: Describes how to use the `pages/` directory to define multiple pages. - category: Develop / Concepts / Multipage apps / Working with widgets url: /develop/concepts/multipage-apps/widgets + description: - category: Develop / Concepts / App design url: /develop/concepts/design + description: How to create dynamic, animated content or update elements without rerunning your app. - category: Develop / Concepts / App design / Animate and update elements url: /develop/concepts/design/animate + description: Display a chart or dataframe and modify it live as the app runs (for example, in a loop). - category: Develop / Concepts / App design / Button behavior and examples url: /develop/concepts/design/buttons + description: Buttons created with `st.button` do not retain state. This comes with some complexity. - category: Develop / Concepts / App design / Dataframes url: /develop/concepts/design/dataframes + description: Dataframes are a great way to display and edit data in a tabular format. - category: Develop / Concepts / App design / Multithreading url: /develop/concepts/design/multithreading + description: How Streamlit uses multiple threads in its design. - category: Develop / Concepts / App design / Using custom classes url: /develop/concepts/design/custom-classes + description: Design patterns for using custom classes in Streamlit. For example, if defining your own custom classes, do it in a separate module. - category: Develop / Concepts / App design / Working with timezones url: /develop/concepts/design/timezone-handling + description: Understand how Streamlit handles time zones. - category: Develop / Concepts / ADDITIONAL - category: Develop / Concepts / Connections, secrets, and authentication url: /develop/concepts/connections + description: - category: Develop / Concepts / Connections, secrets, and authentication / Connecting to data url: /develop/concepts/connections/connecting-to-data + description: Connect to data source using plain Python, or use Streamlit's `st.connection` for some nice extras. - category: Develop / Concepts / Connections, secrets, and authentication / Secrets management url: /develop/concepts/connections/secrets-management + description: Place secrets at `.streamlit/secrets.toml` and access them with `st.secrets`. - category: Develop / Concepts / Connections, secrets, and authentication / User authentication url: /develop/concepts/connections/authentication + description: Simple authentication with OIDC / OAuth2 via `.streamlimt/secrets.toml`, `st.login`, `st.logout`, and `st.user`. - category: Develop / Concepts / Connections, secrets, and authentication / Security reminders url: /develop/concepts/connections/security-reminders + description: Best practices to secure your Streamlit app. - category: Develop / Concepts / Custom components url: /develop/concepts/custom-components + description: Use custom components (or build your own!) to extend Streamlit. - category: Develop / Concepts / Custom components / Intro to custom components url: /develop/concepts/custom-components/intro + description: - category: Develop / Concepts / Custom components / Create a Component url: /develop/concepts/custom-components/create + description: - category: Develop / Concepts / Custom components / Publish a Component url: /develop/concepts/custom-components/publish + description: Custom components are published in PyPI like any Python package. - category: Develop / Concepts / Custom components / Limitations url: /develop/concepts/custom-components/limitations + description: - category: Develop / Concepts / Custom components / Component gallery url: https://streamlit.io/components + description: - category: Develop / Concepts / Configuration and theming url: /develop/concepts/configuration + description: Configure Streamlit and change its looks with `.streamlit/config.toml`. - category: Develop / Concepts / Configuration and theming / Configuration options url: /develop/concepts/configuration/options + description: Learn about every config option. Also available with the command `streamlit config show`. - category: Develop / Concepts / Configuration and theming / HTTPS support url: /develop/concepts/configuration/https-support + description: - category: Develop / Concepts / Configuration and theming / Serving static files url: /develop/concepts/configuration/serving-static-files + description: - category: Develop / Concepts / Configuration and theming / THEMING - category: Develop / Concepts / Configuration and theming / Customize your theme url: /develop/concepts/configuration/theming + description: The preferred way to change how a Streamlit app looks is with themes in `.streamlit/config.toml`. - category: Develop / Concepts / Configuration and theming / Customize colors and borders url: /develop/concepts/configuration/theming-customize-colors-and-borders + description: - category: Develop / Concepts / Configuration and theming / Customize fonts url: /develop/concepts/configuration/theming-customize-fonts + description: - category: Develop / Concepts / App testing url: /develop/concepts/app-testing + description: - category: Develop / Concepts / App testing / Get started url: /develop/concepts/app-testing/get-started + description: - category: Develop / Concepts / App testing / Beyond the basics url: /develop/concepts/app-testing/beyond-the-basics + description: - category: Develop / Concepts / App testing / Automate your tests url: /develop/concepts/app-testing/automate-tests + description: - category: Develop / Concepts / App testing / Example url: /develop/concepts/app-testing/examples + description: - category: Develop / Concepts / App testing / Cheat sheet url: /develop/concepts/app-testing/cheat-sheet + description: - category: Develop / API reference url: /develop/api-reference + description: - category: Develop / API reference / PAGE ELEMENTS - category: Develop / API reference / Write and magic url: /develop/api-reference/write-magic + description: - category: Develop / API reference / Write and magic / st.write url: /develop/api-reference/write-magic/st.write + description: isVersioned: true - category: Develop / API reference / Write and magic / st.write_stream url: /develop/api-reference/write-magic/st.write_stream + description: isVersioned: true - category: Develop / API reference / Write and magic / magic url: /develop/api-reference/write-magic/magic + description: - category: Develop / API reference / Text elements url: /develop/api-reference/text + description: - category: Develop / API reference / Text elements / HEADINGS AND BODY - category: Develop / API reference / Text elements / st.title url: /develop/api-reference/text/st.title + description: isVersioned: true - category: Develop / API reference / Text elements / st.header url: /develop/api-reference/text/st.header + description: isVersioned: true - category: Develop / API reference / Text elements / st.subheader url: /develop/api-reference/text/st.subheader + description: isVersioned: true - category: Develop / API reference / Text elements / st.markdown url: /develop/api-reference/text/st.markdown + description: isVersioned: true - category: Develop / API reference / Text elements / FORMATTED TEXT - category: Develop / API reference / Text elements / st.badge url: /develop/api-reference/text/st.badge + description: isVersioned: true - category: Develop / API reference / Text elements / st.caption url: /develop/api-reference/text/st.caption + description: isVersioned: true - category: Develop / API reference / Text elements / st.code url: /develop/api-reference/text/st.code + description: isVersioned: true - category: Develop / API reference / Text elements / st.divider url: /develop/api-reference/text/st.divider + description: isVersioned: true - category: Develop / API reference / Text elements / st.echo url: /develop/api-reference/text/st.echo + description: isVersioned: true - category: Develop / API reference / Text elements / st.latex url: /develop/api-reference/text/st.latex + description: isVersioned: true - category: Develop / API reference / Text elements / st.text url: /develop/api-reference/text/st.text + description: isVersioned: true - category: Develop / API reference / Text elements / UTILITIES - category: Develop / API reference / Text elements / st.help url: /develop/api-reference/text/st.help + description: isVersioned: true - category: Develop / API reference / Text elements / st.html url: /develop/api-reference/text/st.html + description: isVersioned: true - category: Develop / API reference / Data elements url: /develop/api-reference/data + description: - category: Develop / API reference / Data elements / st.dataframe url: /develop/api-reference/data/st.dataframe + description: isVersioned: true - category: Develop / API reference / Data elements / st.data_editor url: /develop/api-reference/data/st.data_editor + description: isVersioned: true - category: Develop / API reference / Data elements / st.column_config url: /develop/api-reference/data/st.column_config + description: - category: Develop / API reference / Data elements / st.column_config / Column url: /develop/api-reference/data/st.column_config/st.column_config.column + description: isVersioned: true - category: Develop / API reference / Data elements / st.column_config / Text column url: /develop/api-reference/data/st.column_config/st.column_config.textcolumn + description: isVersioned: true - category: Develop / API reference / Data elements / st.column_config / Number column url: /develop/api-reference/data/st.column_config/st.column_config.numbercolumn + description: isVersioned: true - category: Develop / API reference / Data elements / st.column_config / Checkbox column url: /develop/api-reference/data/st.column_config/st.column_config.checkboxcolumn + description: isVersioned: true - category: Develop / API reference / Data elements / st.column_config / Selectbox column url: /develop/api-reference/data/st.column_config/st.column_config.selectboxcolumn + description: isVersioned: true - category: Develop / API reference / Data elements / st.column_config / Datetime column url: /develop/api-reference/data/st.column_config/st.column_config.datetimecolumn + description: isVersioned: true - category: Develop / API reference / Data elements / st.column_config / Date column url: /develop/api-reference/data/st.column_config/st.column_config.datecolumn + description: isVersioned: true - category: Develop / API reference / Data elements / st.column_config / Time column url: /develop/api-reference/data/st.column_config/st.column_config.timecolumn + description: isVersioned: true - category: Develop / API reference / Data elements / st.column_config / JSON column url: /develop/api-reference/data/st.column_config/st.column_config.jsoncolumn + description: isVersioned: true - category: Develop / API reference / Data elements / st.column_config / List column url: /develop/api-reference/data/st.column_config/st.column_config.listcolumn + description: isVersioned: true - category: Develop / API reference / Data elements / st.column_config / Link column url: /develop/api-reference/data/st.column_config/st.column_config.linkcolumn + description: isVersioned: true - category: Develop / API reference / Data elements / st.column_config / Image column url: /develop/api-reference/data/st.column_config/st.column_config.imagecolumn + description: isVersioned: true - category: Develop / API reference / Data elements / st.column_config / Area chart column url: /develop/api-reference/data/st.column_config/st.column_config.areachartcolumn + description: isVersioned: true - category: Develop / API reference / Data elements / st.column_config / Line chart column url: /develop/api-reference/data/st.column_config/st.column_config.linechartcolumn + description: isVersioned: true - category: Develop / API reference / Data elements / st.column_config / Bar chart column url: /develop/api-reference/data/st.column_config/st.column_config.barchartcolumn + description: isVersioned: true - category: Develop / API reference / Data elements / st.column_config / Progress column url: /develop/api-reference/data/st.column_config/st.column_config.progresscolumn + description: isVersioned: true - category: Develop / API reference / Data elements / st.table url: /develop/api-reference/data/st.table + description: isVersioned: true - category: Develop / API reference / Data elements / st.metric url: /develop/api-reference/data/st.metric + description: isVersioned: true - category: Develop / API reference / Data elements / st.json url: /develop/api-reference/data/st.json + description: isVersioned: true - category: Develop / API reference / Data elements / st.experimental_data_editor url: /develop/api-reference/data/st.experimental_data_editor + description: isVersioned: true isDeprecated: true visible: false - category: Develop / API reference / Chart elements url: /develop/api-reference/charts + description: - category: Develop / API reference / Chart elements / SIMPLE - category: Develop / API reference / Chart elements / st.area_chart url: /develop/api-reference/charts/st.area_chart + description: isVersioned: true - category: Develop / API reference / Chart elements / st.bar_chart url: /develop/api-reference/charts/st.bar_chart + description: isVersioned: true - category: Develop / API reference / Chart elements / st.line_chart url: /develop/api-reference/charts/st.line_chart + description: isVersioned: true - category: Develop / API reference / Chart elements / st.map url: /develop/api-reference/charts/st.map + description: isVersioned: true - category: Develop / API reference / Chart elements / st.scatter_chart url: /develop/api-reference/charts/st.scatter_chart + description: isVersioned: true - category: Develop / API reference / Chart elements / ADVANCED - category: Develop / API reference / Chart elements / st.altair_chart url: /develop/api-reference/charts/st.altair_chart + description: isVersioned: true - category: Develop / API reference / Chart elements / st.bokeh_chart url: /develop/api-reference/charts/st.bokeh_chart + description: isVersioned: true - category: Develop / API reference / Chart elements / st.graphviz_chart url: /develop/api-reference/charts/st.graphviz_chart + description: isVersioned: true - category: Develop / API reference / Chart elements / st.plotly_chart url: /develop/api-reference/charts/st.plotly_chart + description: isVersioned: true - category: Develop / API reference / Chart elements / st.pydeck_chart url: /develop/api-reference/charts/st.pydeck_chart + description: isVersioned: true - category: Develop / API reference / Chart elements / st.pyplot url: /develop/api-reference/charts/st.pyplot + description: isVersioned: true - category: Develop / API reference / Chart elements / st.vega_lite_chart url: /develop/api-reference/charts/st.vega_lite_chart + description: isVersioned: true - category: Develop / API reference / Input widgets url: /develop/api-reference/widgets + description: - category: Develop / API reference / Input widgets / BUTTONS - category: Develop / API reference / Input widgets / st.button url: /develop/api-reference/widgets/st.button + description: isVersioned: true - category: Develop / API reference / Input widgets / st.download_button url: /develop/api-reference/widgets/st.download_button + description: isVersioned: true - category: Develop / API reference / Input widgets / st.form_submit_button url: https://docs.streamlit.io/develop/api-reference/execution-flow/st.form_submit_button + description: isVersioned: true - category: Develop / API reference / Input widgets / st.link_button url: /develop/api-reference/widgets/st.link_button + description: isVersioned: true - category: Develop / API reference / Input widgets / st.page_link url: /develop/api-reference/widgets/st.page_link + description: isVersioned: true - category: Develop / API reference / Input widgets / SELECTIONS - category: Develop / API reference / Input widgets / st.checkbox url: /develop/api-reference/widgets/st.checkbox + description: isVersioned: true - category: Develop / API reference / Input widgets / st.color_picker url: /develop/api-reference/widgets/st.color_picker + description: isVersioned: true - category: Develop / API reference / Input widgets / st.feedback url: /develop/api-reference/widgets/st.feedback + description: isVersioned: true - category: Develop / API reference / Input widgets / st.multiselect url: /develop/api-reference/widgets/st.multiselect + description: isVersioned: true - category: Develop / API reference / Input widgets / st.pills url: /develop/api-reference/widgets/st.pills + description: isVersioned: true - category: Develop / API reference / Input widgets / st.radio url: /develop/api-reference/widgets/st.radio + description: isVersioned: true - category: Develop / API reference / Input widgets / st.segmented_control url: /develop/api-reference/widgets/st.segmented_control + description: isVersioned: true - category: Develop / API reference / Input widgets / st.selectbox url: /develop/api-reference/widgets/st.selectbox + description: isVersioned: true - category: Develop / API reference / Input widgets / st.select_slider url: /develop/api-reference/widgets/st.select_slider + description: isVersioned: true - category: Develop / API reference / Input widgets / st.toggle url: /develop/api-reference/widgets/st.toggle + description: isVersioned: true - category: Develop / API reference / Input widgets / NUMERIC - category: Develop / API reference / Input widgets / st.number_input url: /develop/api-reference/widgets/st.number_input + description: isVersioned: true - category: Develop / API reference / Input widgets / st.slider url: /develop/api-reference/widgets/st.slider + description: isVersioned: true - category: Develop / API reference / Input widgets / DATE AND TIME - category: Develop / API reference / Input widgets / st.date_input url: /develop/api-reference/widgets/st.date_input + description: isVersioned: true - category: Develop / API reference / Input widgets / st.time_input url: /develop/api-reference/widgets/st.time_input + description: isVersioned: true - category: Develop / API reference / Input widgets / TEXT - category: Develop / API reference / Input widgets / st.chat_input url: https://docs.streamlit.io/develop/api-reference/chat/st.chat_input + description: isVersioned: true - category: Develop / API reference / Input widgets / st.text_area url: /develop/api-reference/widgets/st.text_area + description: isVersioned: true - category: Develop / API reference / Input widgets / st.text_input url: /develop/api-reference/widgets/st.text_input + description: isVersioned: true - category: Develop / API reference / Input widgets / MEDIA AND FILES - category: Develop / API reference / Input widgets / st.audio_input url: /develop/api-reference/widgets/st.audio_input + description: isVersioned: true - category: Develop / API reference / Input widgets / st.camera_input url: /develop/api-reference/widgets/st.camera_input + description: isVersioned: true - category: Develop / API reference / Input widgets / st.data_editor url: https://docs.streamlit.io/develop/api-reference/data/st.data_editor + description: isVersioned: true - category: Develop / API reference / Input widgets / st.file_uploader url: /develop/api-reference/widgets/st.file_uploader + description: isVersioned: true - category: Develop / API reference / Media elements url: /develop/api-reference/media + description: - category: Develop / API reference / Media elements / st.audio url: /develop/api-reference/media/st.audio + description: isVersioned: true - category: Develop / API reference / Media elements / st.image url: /develop/api-reference/media/st.image + description: isVersioned: true - category: Develop / API reference / Media elements / st.logo url: /develop/api-reference/media/st.logo + description: isVersioned: true - category: Develop / API reference / Media elements / st.pdf url: /develop/api-reference/media/st.pdf + description: isVersioned: true - category: Develop / API reference / Media elements / st.video url: /develop/api-reference/media/st.video + description: isVersioned: true - category: Develop / API reference / Layouts and containers url: /develop/api-reference/layout + description: - category: Develop / API reference / Layouts and containers / st.columns url: /develop/api-reference/layout/st.columns + description: isVersioned: true - category: Develop / API reference / Layouts and containers / st.container url: /develop/api-reference/layout/st.container + description: isVersioned: true - category: Develop / API reference / Layouts and containers / st.dialog url: https://docs.streamlit.io/develop/api-reference/execution-flow/st.dialog + description: isVersioned: true - category: Develop / API reference / Layouts and containers / st.empty url: /develop/api-reference/layout/st.empty + description: isVersioned: true - category: Develop / API reference / Layouts and containers / st.expander url: /develop/api-reference/layout/st.expander + description: isVersioned: true - category: Develop / API reference / Layouts and containers / st.form url: https://docs.streamlit.io/develop/api-reference/execution-flow/st.form + description: isVersioned: true - category: Develop / API reference / Layouts and containers / st.popover url: /develop/api-reference/layout/st.popover + description: isVersioned: true - category: Develop / API reference / Layouts and containers / st.sidebar url: /develop/api-reference/layout/st.sidebar + description: isVersioned: true - category: Develop / API reference / Layouts and containers / st.tabs url: /develop/api-reference/layout/st.tabs + description: isVersioned: true - category: Develop / API reference / Chat elements url: /develop/api-reference/chat + description: - category: Develop / API reference / Chat elements / st.chat_input url: /develop/api-reference/chat/st.chat_input + description: isVersioned: true - category: Develop / API reference / Chat elements / st.chat_message url: /develop/api-reference/chat/st.chat_message + description: isVersioned: true - category: Develop / API reference / Chat elements / st.status url: https://docs.streamlit.io/develop/api-reference/status/st.status + description: isVersioned: true - category: Develop / API reference / Chat elements / st.write_stream url: https://docs.streamlit.io/develop/api-reference/write-magic/st.write_stream + description: isVersioned: true - category: Develop / API reference / Status elements url: /develop/api-reference/status + description: - category: Develop / API reference / Status elements / CALLOUTS - category: Develop / API reference / Status elements / st.success url: /develop/api-reference/status/st.success + description: isVersioned: true - category: Develop / API reference / Status elements / st.info url: /develop/api-reference/status/st.info + description: isVersioned: true - category: Develop / API reference / Status elements / st.warning url: /develop/api-reference/status/st.warning + description: isVersioned: true - category: Develop / API reference / Status elements / st.error url: /develop/api-reference/status/st.error + description: isVersioned: true - category: Develop / API reference / Status elements / st.exception url: /develop/api-reference/status/st.exception + description: isVersioned: true - category: Develop / API reference / Status elements / OTHER - category: Develop / API reference / Status elements / st.progress url: /develop/api-reference/status/st.progress + description: isVersioned: true - category: Develop / API reference / Status elements / st.spinner url: /develop/api-reference/status/st.spinner + description: isVersioned: true - category: Develop / API reference / Status elements / st.status url: /develop/api-reference/status/st.status + description: isVersioned: true - category: Develop / API reference / Status elements / st.toast url: /develop/api-reference/status/st.toast + description: isVersioned: true - category: Develop / API reference / Status elements / st.balloons url: /develop/api-reference/status/st.balloons + description: isVersioned: true - category: Develop / API reference / Status elements / st.snow url: /develop/api-reference/status/st.snow + description: isVersioned: true - category: Develop / API reference / Third-party components url: https://streamlit.io/components + description: - category: Develop / API reference / APPLICATION LOGIC - category: Develop / API reference / Authentication and user info url: /develop/api-reference/user + description: - category: Develop / API reference / Authentication and user info / st.login url: /develop/api-reference/user/st.login + description: isVersioned: true - category: Develop / API reference / Authentication and user info / st.logout url: /develop/api-reference/user/st.logout + description: isVersioned: true - category: Develop / API reference / Authentication and user info / st.user url: /develop/api-reference/user/st.user + description: isVersioned: true - category: Develop / API reference / Navigation and pages url: /develop/api-reference/navigation + description: - category: Develop / API reference / Navigation and pages / st.navigation url: /develop/api-reference/navigation/st.navigation + description: isVersioned: true - category: Develop / API reference / Navigation and pages / st.Page url: /develop/api-reference/navigation/st.page + description: isVersioned: true - category: Develop / API reference / Navigation and pages / st.page_link url: https://docs.streamlit.io/develop/api-reference/widgets/st.page_link + description: isVersioned: true - category: Develop / API reference / Navigation and pages / st.switch_page url: /develop/api-reference/navigation/st.switch_page + description: isVersioned: true - category: Develop / API reference / Execution flow url: /develop/api-reference/execution-flow + description: - category: Develop / API reference / Execution flow / st.dialog url: /develop/api-reference/execution-flow/st.dialog + description: isVersioned: true - category: Develop / API reference / Execution flow / st.form url: /develop/api-reference/execution-flow/st.form + description: isVersioned: true - category: Develop / API reference / Execution flow / st.form_submit_button url: /develop/api-reference/execution-flow/st.form_submit_button + description: isVersioned: true - category: Develop / API reference / Execution flow / st.fragment url: /develop/api-reference/execution-flow/st.fragment + description: isVersioned: true - category: Develop / API reference / Execution flow / st.rerun url: /develop/api-reference/execution-flow/st.rerun + description: isVersioned: true - category: Develop / API reference / Execution flow / st.stop url: /develop/api-reference/execution-flow/st.stop + description: isVersioned: true - category: Develop / API reference / Execution flow / st.experimental_rerun url: /develop/api-reference/execution-flow/st.experimental_rerun + description: isVersioned: true isDeprecated: true visible: false - category: Develop / API reference / Caching and state url: /develop/api-reference/caching-and-state + description: - category: Develop / API reference / Caching and state / SERVER - category: Develop / API reference / Caching and state / st.cache_data url: /develop/api-reference/caching-and-state/st.cache_data + description: isVersioned: true - category: Develop / API reference / Caching and state / st.cache_resource url: /develop/api-reference/caching-and-state/st.cache_resource + description: isVersioned: true - category: Develop / API reference / Caching and state / st.experimental_memo url: /develop/api-reference/caching-and-state/st.experimental_memo + description: isVersioned: true isDeprecated: true visible: false - category: Develop / API reference / Caching and state / st.experimental_singleton url: /develop/api-reference/caching-and-state/st.experimental_singleton + description: isVersioned: true isDeprecated: true visible: false - category: Develop / API reference / Caching and state / st.session_state url: /develop/api-reference/caching-and-state/st.session_state + description: - category: Develop / API reference / Caching and state / BROWSER - category: Develop / API reference / Caching and state / st.context url: /develop/api-reference/caching-and-state/st.context + description: isVersioned: true - category: Develop / API reference / Caching and state / st.query_params url: /develop/api-reference/caching-and-state/st.query_params + description: isVersioned: true - category: Develop / API reference / Caching and state / st.experimental_get_query_params url: /develop/api-reference/caching-and-state/st.experimental_get_query_params + description: isVersioned: true isDeprecated: true - category: Develop / API reference / Caching and state / st.experimental_set_query_params url: /develop/api-reference/caching-and-state/st.experimental_set_query_params + description: isVersioned: true isDeprecated: true - category: Develop / API reference / Connections and secrets url: /develop/api-reference/connections + description: - category: Develop / API reference / Connections and secrets / SECRETS - category: Develop / API reference / Connections and secrets / st.secrets url: /develop/api-reference/connections/st.secrets + description: - category: Develop / API reference / Connections and secrets / secrets.toml url: /develop/api-reference/connections/secrets.toml + description: - category: Develop / API reference / Connections and secrets / CONNECTIONS - category: Develop / API reference / Connections and secrets / st.connection url: /develop/api-reference/connections/st.connection + description: isVersioned: true - category: Develop / API reference / Connections and secrets / SnowflakeConnection url: /develop/api-reference/connections/st.connections.snowflakeconnection + description: isVersioned: true - category: Develop / API reference / Connections and secrets / SQLConnection url: /develop/api-reference/connections/st.connections.sqlconnection + description: isVersioned: true - category: Develop / API reference / Connections and secrets / BaseConnection url: /develop/api-reference/connections/st.connections.baseconnection + description: isVersioned: true - category: Develop / API reference / Connections and secrets / st.experimental_connection url: /develop/api-reference/connections/st.experimental_connection + description: isVersioned: true isDeprecated: true visible: false - category: Develop / API reference / Connections and secrets / SnowparkConnection url: /develop/api-reference/connections/st.connections.snowparkconnection + description: isVersioned: true isDeprecated: true - category: Develop / API reference / Connections and secrets / ExperimentalBaseConnection url: /develop/api-reference/connections/st.connections.experimentalbaseconnection + description: isVersioned: true isDeprecated: true visible: false - category: Develop / API reference / Custom components url: /develop/api-reference/custom-components + description: isVersioned: false - category: Develop / API reference / Custom components / st.components.v1​.declare_component url: /develop/api-reference/custom-components/st.components.v1.declare_component + description: isVersioned: true - category: Develop / API reference / Custom components / st.components.v1.html url: /develop/api-reference/custom-components/st.components.v1.html + description: isVersioned: true - category: Develop / API reference / Custom components / st.components.v1.iframe url: /develop/api-reference/custom-components/st.components.v1.iframe + description: isVersioned: true - category: Develop / API reference / Configuration url: /develop/api-reference/configuration + description: isVersioned: false - category: Develop / API reference / Configuration / config.toml url: /develop/api-reference/configuration/config.toml + description: - category: Develop / API reference / Configuration / st.get_option url: /develop/api-reference/configuration/st.get_option + description: isVersioned: true - category: Develop / API reference / Configuration / st.set_option url: /develop/api-reference/configuration/st.set_option + description: isVersioned: true - category: Develop / API reference / Configuration / st.set_page_config url: /develop/api-reference/configuration/st.set_page_config + description: isVersioned: true - category: Develop / API reference / TOOLS - category: Develop / API reference / App testing url: /develop/api-reference/app-testing + description: - category: Develop / API reference / App testing / st.testing.v1.AppTest url: /develop/api-reference/app-testing/st.testing.v1.apptest + description: isVersioned: true - category: Develop / API reference / App testing / Testing element classes url: /develop/api-reference/app-testing/testing-element-classes + description: isVersioned: true - category: Develop / API reference / Command line url: /develop/api-reference/cli + description: - category: Develop / API reference / Command line / streamlit cache url: /develop/api-reference/cli/cache + description: - category: Develop / API reference / Command line / streamlit config url: /develop/api-reference/cli/config + description: - category: Develop / API reference / Command line / streamlit docs url: /develop/api-reference/cli/docs + description: - category: Develop / API reference / Command line / streamlit hello url: /develop/api-reference/cli/hello + description: - category: Develop / API reference / Command line / streamlit help url: /develop/api-reference/cli/help + description: - category: Develop / API reference / Command line / streamlit init url: /develop/api-reference/cli/init + description: - category: Develop / API reference / Command line / streamlit run url: /develop/api-reference/cli/run + description: - category: Develop / API reference / Command line / streamlit version url: /develop/api-reference/cli/version + description: - category: Develop / Tutorials url: /develop/tutorials + description: - category: Develop / Tutorials / Authentication and personalization url: /develop/tutorials/authentication + description: - category: Develop / Tutorials / Authentication and personalization / Google Auth Platform url: /develop/tutorials/authentication/google + description: - category: Develop / Tutorials / Authentication and personalization / Microsoft Entra url: /develop/tutorials/authentication/microsoft + description: - category: Develop / Tutorials / Chat and LLM apps url: /develop/tutorials/chat-and-llm-apps + description: - category: Develop / Tutorials / Chat and LLM apps / Build a basic LLM chat app url: /develop/tutorials/chat-and-llm-apps/build-conversational-apps + description: - category: Develop / Tutorials / Chat and LLM apps / Build an LLM app using LangChain url: /develop/tutorials/chat-and-llm-apps/llm-quickstart + description: - category: Develop / Tutorials / Chat and LLM apps / Get chat response feedback url: /develop/tutorials/chat-and-llm-apps/chat-response-feedback + description: - category: Develop / Tutorials / Chat and LLM apps / Validate and edit chat responses url: /develop/tutorials/chat-and-llm-apps/validate-and-edit-chat-responses + description: - category: Develop / Tutorials / Configuration and theming url: /develop/tutorials/configuration-and-theming + description: - category: Develop / Tutorials / Configuration and theming / Use external font files url: /develop/tutorials/configuration-and-theming/external-fonts + description: - category: Develop / Tutorials / Configuration and theming / Use static font files url: /develop/tutorials/configuration-and-theming/static-fonts + description: - category: Develop / Tutorials / Configuration and theming / Use variable font files url: /develop/tutorials/configuration-and-theming/variable-fonts + description: - category: Develop / Tutorials / Connect to data sources url: /develop/tutorials/databases + description: - category: Develop / Tutorials / Connect to data sources / AWS S3 url: /develop/tutorials/databases/aws-s3 + description: - category: Develop / Tutorials / Connect to data sources / BigQuery url: /develop/tutorials/databases/bigquery + description: - category: Develop / Tutorials / Connect to data sources / Firestore url: https://blog.streamlit.io/streamlit-firestore/ + description: - category: Develop / Tutorials / Connect to data sources / Google Cloud Storage url: /develop/tutorials/databases/gcs + description: - category: Develop / Tutorials / Connect to data sources / Microsoft SQL Server url: /develop/tutorials/databases/mssql + description: - category: Develop / Tutorials / Connect to data sources / MongoDB url: /develop/tutorials/databases/mongodb + description: - category: Develop / Tutorials / Connect to data sources / MySQL url: /develop/tutorials/databases/mysql + description: - category: Develop / Tutorials / Connect to data sources / Neon url: /develop/tutorials/databases/neon + description: - category: Develop / Tutorials / Connect to data sources / PostgreSQL url: /develop/tutorials/databases/postgresql + description: - category: Develop / Tutorials / Connect to data sources / Private Google Sheet url: /develop/tutorials/databases/private-gsheet + description: - category: Develop / Tutorials / Connect to data sources / Public Google Sheet url: /develop/tutorials/databases/public-gsheet + description: - category: Develop / Tutorials / Connect to data sources / Snowflake url: /develop/tutorials/databases/snowflake + description: - category: Develop / Tutorials / Connect to data sources / Supabase url: /develop/tutorials/databases/supabase + description: - category: Develop / Tutorials / Connect to data sources / Tableau url: /develop/tutorials/databases/tableau + description: - category: Develop / Tutorials / Connect to data sources / TiDB url: /develop/tutorials/databases/tidb + description: - category: Develop / Tutorials / Connect to data sources / TigerGraph url: /develop/tutorials/databases/tigergraph + description: - category: Develop / Tutorials / Elements url: /develop/tutorials/elements + description: - category: Develop / Tutorials / Elements / CHARTS - category: Develop / Tutorials / Elements / Annotate an Altair chart url: /develop/tutorials/elements/annotate-an-altair-chart + description: - category: Develop / Tutorials / Elements / DATAFRAMES - category: Develop / Tutorials / Elements / Get dataframe row-selections url: /develop/tutorials/elements/dataframe-row-selections + description: - category: Develop / Tutorials / Elements / Get dataframe row-selections (streamlit<1.35.0) url: /develop/tutorials/elements/dataframe-row-selections-old + description: visible: false - category: Develop / Tutorials / Execution flow url: /develop/tutorials/execution-flow + description: - category: Develop / Tutorials / Execution flow / FRAGMENTS - category: Develop / Tutorials / Execution flow / Rerun your app from a fragment url: /develop/tutorials/execution-flow/trigger-a-full-script-rerun-from-a-fragment + description: - category: Develop / Tutorials / Execution flow / Create a multiple-container fragment url: /develop/tutorials/execution-flow/create-a-multiple-container-fragment + description: - category: Develop / Tutorials / Execution flow / Start and stop a streaming fragment url: /develop/tutorials/execution-flow/start-and-stop-fragment-auto-reruns + description: - category: Develop / Tutorials / Multipage apps url: /develop/tutorials/multipage + description: - category: Develop / Tutorials / Multipage apps / Dynamic navigation url: /develop/tutorials/multipage/dynamic-navigation + description: - category: Develop / Tutorials / Multipage apps / Build navigation with st.page_link url: /develop/tutorials/multipage/st.page_link-nav + description: visible: false - category: Develop / Quick reference url: /develop/quick-reference + description: - category: Develop / Quick reference / Cheat sheet url: /develop/quick-reference/cheat-sheet + description: - category: Develop / Quick reference / Release notes url: /develop/quick-reference/release-notes + description: - category: Develop / Quick reference / Release notes / 2025 url: /develop/quick-reference/release-notes/2025 + description: - category: Develop / Quick reference / Release notes / 2024 url: /develop/quick-reference/release-notes/2024 + description: - category: Develop / Quick reference / Release notes / 2023 url: /develop/quick-reference/release-notes/2023 + description: - category: Develop / Quick reference / Release notes / 2022 url: /develop/quick-reference/release-notes/2022 + description: - category: Develop / Quick reference / Release notes / 2021 url: /develop/quick-reference/release-notes/2021 + description: - category: Develop / Quick reference / Release notes / 2020 url: /develop/quick-reference/release-notes/2020 + description: - category: Develop / Quick reference / Release notes / 2019 url: /develop/quick-reference/release-notes/2019 + description: - category: Develop / Quick reference / Pre-release features url: /develop/quick-reference/prerelease + description: - category: Develop / Quick reference/ Roadmap url: https://roadmap.streamlit.app + description: - category: Deploy url: /deploy + description: color: lightBlue-70 icon: web_asset - category: Deploy / Concepts url: /deploy/concepts + description: - category: Deploy / Concepts / Dependencies url: /deploy/concepts/dependencies + description: - category: Deploy / Concepts / Secrets url: /deploy/concepts/secrets + description: - category: Deploy / Streamlit Community Cloud url: /deploy/streamlit-community-cloud + description: - category: Deploy / Streamlit Community Cloud / Get started url: /deploy/streamlit-community-cloud/get-started + description: - category: Deploy / Streamlit Community Cloud / Get started / Quickstart url: /deploy/streamlit-community-cloud/get-started/quickstart + description: - category: Deploy / Streamlit Community Cloud / Get started / Create your account url: /deploy/streamlit-community-cloud/get-started/create-your-account + description: - category: Deploy / Streamlit Community Cloud / Get started / Connect your GitHub account url: /deploy/streamlit-community-cloud/get-started/connect-your-github-account + description: - category: Deploy / Streamlit Community Cloud / Get started / Explore your workspace url: /deploy/streamlit-community-cloud/get-started/explore-your-workspace + description: - category: Deploy / Streamlit Community Cloud / Get started / Deploy from a template url: /deploy/streamlit-community-cloud/get-started/deploy-from-a-template + description: - category: Deploy / Streamlit Community Cloud / Get started / Fork and edit a public app url: /deploy/streamlit-community-cloud/get-started/fork-and-edit-a-public-app + description: - category: Deploy / Streamlit Community Cloud / Get started / Trust and security url: /deploy/streamlit-community-cloud/get-started/trust-and-security + description: - category: Deploy / Streamlit Community Cloud / Deploy your app url: /deploy/streamlit-community-cloud/deploy-your-app + description: - category: Deploy / Streamlit Community Cloud / Deploy your app / File organization url: /deploy/streamlit-community-cloud/deploy-your-app/file-organization + description: - category: Deploy / Streamlit Community Cloud / Deploy your app / App dependencies url: /deploy/streamlit-community-cloud/deploy-your-app/app-dependencies + description: - category: Deploy / Streamlit Community Cloud / Deploy your app / Secrets management url: /deploy/streamlit-community-cloud/deploy-your-app/secrets-management + description: - category: Deploy / Streamlit Community Cloud / Deploy your app / Deploy! url: /deploy/streamlit-community-cloud/deploy-your-app/deploy + description: - category: Deploy / Streamlit Community Cloud / Manage your app url: /deploy/streamlit-community-cloud/manage-your-app + description: - category: Deploy / Streamlit Community Cloud / Manage your app / App analytics url: /deploy/streamlit-community-cloud/manage-your-app/app-analytics + description: - category: Deploy / Streamlit Community Cloud / Manage your app / App settings url: /deploy/streamlit-community-cloud/manage-your-app/app-settings + description: - category: Deploy / Streamlit Community Cloud / Manage your app / Delete your app url: /deploy/streamlit-community-cloud/manage-your-app/delete-your-app + description: - category: Deploy / Streamlit Community Cloud / Manage your app / Edit your app url: /deploy/streamlit-community-cloud/manage-your-app/edit-your-app + description: - category: Deploy / Streamlit Community Cloud / Manage your app / Favorite your app url: /deploy/streamlit-community-cloud/manage-your-app/favorite-your-app + description: - category: Deploy / Streamlit Community Cloud / Manage your app / Reboot your app url: /deploy/streamlit-community-cloud/manage-your-app/reboot-your-app + description: - category: Deploy / Streamlit Community Cloud / Manage your app / Rename your app in GitHub url: /deploy/streamlit-community-cloud/manage-your-app/rename-your-app + description: - category: Deploy / Streamlit Community Cloud / Manage your app / Upgrade Python url: /deploy/streamlit-community-cloud/manage-your-app/upgrade-python + description: - category: Deploy / Streamlit Community Cloud / Manage your app / Upgrade Streamlit url: /deploy/streamlit-community-cloud/manage-your-app/upgrade-streamlit + description: - category: Deploy / Streamlit Community Cloud / Share your app url: /deploy/streamlit-community-cloud/share-your-app + description: - category: Deploy / Streamlit Community Cloud / Share your app / Embed your app url: /deploy/streamlit-community-cloud/share-your-app/embed-your-app + description: - category: Deploy / Streamlit Community Cloud / Share your app / Search indexability url: /deploy/streamlit-community-cloud/share-your-app/indexability + description: - category: Deploy / Streamlit Community Cloud / Share your app / Share previews url: /deploy/streamlit-community-cloud/share-your-app/share-previews + description: - category: Deploy / Streamlit Community Cloud / Manage your account url: /deploy/streamlit-community-cloud/manage-your-account + description: - category: Deploy / Streamlit Community Cloud / Manage your account / Sign in and sign out url: /deploy/streamlit-community-cloud/manage-your-account/sign-in-sign-out + description: - category: Deploy / Streamlit Community Cloud / Manage your account / Workspace settings url: /deploy/streamlit-community-cloud/manage-your-account/workspace-settings + description: - category: Deploy / Streamlit Community Cloud / Manage your account / Manage your GitHub connection url: /deploy/streamlit-community-cloud/manage-your-account/manage-your-github-connection + description: - category: Deploy / Streamlit Community Cloud / Manage your account / Update your email url: /deploy/streamlit-community-cloud/manage-your-account/update-your-email + description: - category: Deploy / Streamlit Community Cloud / Manage your account / Delete your account url: /deploy/streamlit-community-cloud/manage-your-account/delete-your-account + description: - category: Deploy / Streamlit Community Cloud / Status and limitations url: /deploy/streamlit-community-cloud/status + description: - category: Deploy / Snowflake url: /deploy/snowflake + description: - category: Deploy / Other platforms url: /deploy/tutorials + description: - category: Deploy / Other platforms / Docker url: /deploy/tutorials/docker + description: - category: Deploy / Other platforms / Kubernetes url: /deploy/tutorials/kubernetes + description: - category: Knowledge base url: /knowledge-base + description: color: darkBlue-70 icon: school - category: Knowledge base / FAQ url: /knowledge-base/using-streamlit + description: - category: Knowledge base / FAQ / How do I create an anchor link? url: /knowledge-base/using-streamlit/create-anchor-link + description: visible: false - category: Knowledge base / FAQ / Enabling camera access in your browser url: /knowledge-base/using-streamlit/enable-camera + description: visible: false - category: Knowledge base / FAQ / How to download a file in Streamlit? url: /knowledge-base/using-streamlit/how-download-file-streamlit + description: visible: false - category: Knowledge base / FAQ / How to download a Pandas DataFrame as a CSV? url: /knowledge-base/using-streamlit/how-download-pandas-dataframe-csv + description: visible: false - category: Knowledge base / FAQ / How do I upgrade to the latest version of Streamlit? url: /knowledge-base/using-streamlit/how-upgrade-latest-version-streamlit + description: visible: false - category: Knowledge base / FAQ / How to insert elements out of order? url: /knowledge-base/using-streamlit/insert-elements-out-of-order + description: visible: false - category: Knowledge base / FAQ / How can I make st.pydeck_chart use custom Mapbox styles? url: /knowledge-base/using-streamlit/pydeck-chart-custom-mapbox-styles + description: visible: false - category: Knowledge base / FAQ / How to remove "· Streamlit" from the app title? url: /knowledge-base/using-streamlit/remove-streamlit-app-title + description: visible: false - category: Knowledge base / FAQ / How do you retrieve the filename of a file uploaded with st.file_uploader? url: /knowledge-base/using-streamlit/retrieve-filename-uploaded + description: visible: false - category: Knowledge base / FAQ / Sanity checks url: /knowledge-base/using-streamlit/sanity-checks + description: visible: false - category: Knowledge base / FAQ / How can I make Streamlit watch for changes in other modules I'm importing in my app? url: /knowledge-base/using-streamlit/streamlit-watch-changes-other-modules-importing-app + description: visible: false - category: Knowledge base / FAQ / What browsers does Streamlit support? url: /knowledge-base/using-streamlit/supported-browsers + description: visible: false - category: Knowledge base / FAQ / Where does st.file_uploader store uploaded files and when do they get deleted? url: /knowledge-base/using-streamlit/where-file-uploader-store-when-deleted + description: visible: false - category: Knowledge base / FAQ / Widget updating for every second input when using session state url: /knowledge-base/using-streamlit/widget-updating-session-state + description: visible: false - category: Knowledge base / FAQ / Why does Streamlit restrict nested st.columns? url: /knowledge-base/using-streamlit/why-streamlit-restrict-nested-columns + description: visible: false - category: Knowledge base / FAQ / What is serializable session state? url: /knowledge-base/using-streamlit/serializable-session-state + description: visible: false - category: Knowledge base / Installing dependencies url: /knowledge-base/dependencies + description: - category: Knowledge base / Installing dependencies / How to install a package not on PyPI or Conda but available on GitHub url: /knowledge-base/dependencies/install-package-not-pypi-conda-available-github + description: visible: false - category: Knowledge base / Installing dependencies / ImportError libGL.so.1 cannot open shared object file No such file or directory url: /knowledge-base/dependencies/libgl + description: visible: false - category: Knowledge base / Installing dependencies / ModuleNotFoundError No module named url: /knowledge-base/dependencies/module-not-found-error + description: visible: false - category: Knowledge base / Installing dependencies / ERROR No matching distribution found for url: /knowledge-base/dependencies/no-matching-distribution + description: visible: false - category: Knowledge base / Deployment issues url: /knowledge-base/deploy + description: - category: Knowledge base / Deployment issues / How can I deploy multiple Streamlit apps on different subdomains? url: /knowledge-base/deploy/deploy-multiple-streamlit-apps-different-subdomains + description: visible: false - category: Knowledge base / Deployment issues / How do I deploy Streamlit on a domain so it appears to run on a regular port (i.e. port 80)? url: /knowledge-base/deploy/deploy-streamlit-domain-port-80 + description: visible: false - category: Knowledge base / Deployment issues / Does Streamlit support the WSGI Protocol? (aka Can I deploy Streamlit with gunicorn?) url: /knowledge-base/deploy/does-streamlit-support-wsgi-protocol + description: visible: false - category: Knowledge base / Deployment issues / How do I increase the upload limit of st.file_uploader on Streamlit Community Cloud? url: /knowledge-base/deploy/increase-file-uploader-limit-streamlit-cloud + description: visible: false - category: Knowledge base / Deployment issues / Invoking a Python subprocess in a deployed Streamlit app url: /knowledge-base/deploy/invoking-python-subprocess-deployed-streamlit-app + description: visible: false - category: Knowledge base / Deployment issues / App is not loading when running remotely url: /knowledge-base/deploy/remote-start + description: visible: false - category: Knowledge base / Deployment issues / Argh. This app has gone over its resource limits url: /knowledge-base/deploy/resource-limits + description: visible: false - category: Knowledge base / Deployment issues / How do I share apps with viewers outside my organization? url: /knowledge-base/deploy/share-apps-with-viewers-outside-organization + description: visible: false - category: Knowledge base / Deployment issues / Upgrade the Streamlit version of your app on Streamlit Community Cloud url: /knowledge-base/deploy/upgrade-streamlit-version-on-streamlit-cloud + description: visible: false - category: Knowledge base / Deployment issues / Huh. This is isn't supposed to happen message after trying to log in url: /knowledge-base/deploy/huh-this-isnt-supposed-to-happen-message-after-trying-to-log-in + description: visible: false - category: Knowledge base / Deployment issues / Login attempt to Streamlit Community Cloud fails with error 403 url: /knowledge-base/deploy/login-attempt-to-streamlit-community-cloud-fails-with-error-403 + description: visible: false - category: Knowledge base / Deployment issues / How to submit a support case for Streamlit Community Cloud url: /knowledge-base/deploy/how-to-submit-a-support-case-for-streamlit-community-cloud + description: visible: false --- diff --git a/makefile b/makefile index 60b7854ab..f3bea7d4b 100644 --- a/makefile +++ b/makefile @@ -11,11 +11,15 @@ start: npm run start .PHONY: export -export: llms +export: llms llms-full npm run export .PHONY: llms llms: + uv run python/generate_llms_txt.py + +.PHONY: llms-full +llms-full: uv run python/generate_llms_full_txt.py .PHONY: lint diff --git a/public/llms-full.txt b/public/llms-full.txt index 128908e7f..d62cdca3b 100644 --- a/public/llms-full.txt +++ b/public/llms-full.txt @@ -1,2 +1 @@ This gets autogenerated on deploy. See `make export`. - diff --git a/public/llms.txt b/public/llms.txt new file mode 100644 index 000000000..d62cdca3b --- /dev/null +++ b/public/llms.txt @@ -0,0 +1 @@ +This gets autogenerated on deploy. See `make export`. diff --git a/python/generate_content_catalog.py b/python/generate_content_catalog.py deleted file mode 100644 index 75063b488..000000000 --- a/python/generate_content_catalog.py +++ /dev/null @@ -1,84 +0,0 @@ -# /// script -# dependencies = [ -# "python-frontmatter>=1.0.0", -# ] -# /// -# -# This file is used to generate content_catalog.json, which contains -# the markdown contents for every page of Streamlit's documentation in -# the format [{url: "the_url", content: "the_content"}, ...] -# -# content_catalog.json is used in the RAG pipeline for st-assistant.streamlit.app. -# -# In the future, we may also want to use this file to generate llms.txt -# and llms-full.txt, since they serve a very similar purpose to content_catalog.json. -# -# Usage: -# uv run generate_content_catalog.py - -import json -from typing import List, Dict, Optional -import frontmatter -from pathlib import Path - - -def process_markdown_files(content_dir: Path) -> List[Dict[str, Optional[str]]]: - """Process all markdown files in the content directory and its subdirectories. - - Args: - content_dir: Path to the content directory containing markdown files. - - Returns: - List of dictionaries containing 'url' (from frontmatter slug) and 'content' for each markdown file. - """ - content_catalog: List[Dict[str, Optional[str]]] = [] - - # Walk through all directories and files - for file_path in content_dir.rglob("*.md"): - try: - # Read the content of the markdown file with frontmatter - post = frontmatter.load(file_path) - - # Get the URL from frontmatter slug if it exists, otherwise set to null - url = post.get("slug") - - if not url: - continue - - url = f"https://docs.streamlit.io{url}" - - # Add to catalog - content_catalog.append({"url": url, "content": post.content}) - except frontmatter.FrontmatterError as e: - print(f"Error parsing frontmatter in {file_path}: {str(e)}") - except Exception as e: - print(f"Error processing {file_path}: {str(e)}") - - return content_catalog - - -def main() -> None: - """Generate a content catalog JSON file from markdown files in the content directory.""" - # Get the content directory path (sibling to the python directory) - content_dir = Path(__file__).parent.parent / "content" - - # Process all markdown files - content_catalog = process_markdown_files(content_dir) - - # Write the catalog to a JSON file in the python directory - output_file = Path(__file__).parent / "content_catalog.json" - try: - output_file.write_text( - json.dumps(content_catalog, ensure_ascii=False, indent=2), encoding="utf-8" - ) - print( - f"Successfully generated {output_file} with {len(content_catalog)} entries" - ) - except json.JSONEncodeError as e: - print(f"Error encoding JSON for {output_file}: {str(e)}") - except Exception as e: - print(f"Error writing {output_file}: {str(e)}") - - -if __name__ == "__main__": - main() diff --git a/python/generate_llms_txt.py b/python/generate_llms_txt.py new file mode 100644 index 000000000..7cde8974a --- /dev/null +++ b/python/generate_llms_txt.py @@ -0,0 +1,116 @@ +# /// script +# dependencies = [ +# "python-frontmatter>=1.0.0", +# ] +# /// +# +# This file is used to generate llms.txt, which describes the structure +# of Streamlit's documentation, with links for more info. +# +# Usage: +# uv run generate_llms_txt.py + +from typing import Dict, Any +import frontmatter +from pathlib import Path + +CATEGORY_SEP = " / " + +INITIAL_TEXT = """\ +# Streamlit documentation website + +> Streamlit is a powerful open-source Python framework that allows data +scientists and AI/ML engineers to build interactive apps (i.e. data apps) +with only a few lines of code.""" + + +def read_menu_file(menu_file_path: Path) -> Dict: + # Read the menu.md file + with open(menu_file_path, "r", encoding="utf-8") as f: + content = f.read() + + # Parse the frontmatter + post = frontmatter.loads(content) + return post.metadata.get("site_menu", {}) + + +def main() -> None: + # Get the content directory path (sibling to the python directory) + content_dir = Path(__file__).parent.parent / "content" + + menu_file_path = content_dir / "menu.md" + + try: + menu_dict = read_menu_file(menu_file_path) + except Exception as e: + print("Error reading menu file\n") + raise e + + output = [INITIAL_TEXT] + prev_output_is_paragraph = True + + for menu_item in menu_dict: + try: + if "visible_to_llms" in menu_item: + if not menu_item["visible_to_llms"]: + continue + else: + if not menu_item.get("visible", True): + continue + if "category" not in menu_item: + continue + if "url" not in menu_item: + continue + + category_list = menu_item["category"].split(CATEGORY_SEP) + url = menu_item["url"] + + description = menu_item.get("description", "") + + # This assumes menu.md is in order. + category_label = category_list[-1] + + indentation = "" + + if len(category_list) == 1: + output.append("") + output.append(f"## {category_label}") + output.append(f"({url})") + if description: + output.append("") + output.append(description) + prev_output_is_paragraph = True + + elif len(category_list) == 2: + output.append("") + output.append(f"### {category_label}") + output.append(f"({url})") + if description: + output.append("") + output.append(description) + prev_output_is_paragraph = True + + else: + if prev_output_is_paragraph: + output.append("") + + num_indents = len(category_list) - 3 + indentation = num_indents * " " + output.append(f"{indentation}- [{category_label}]({url})") + if description: + output.append(f"{indentation} {description}") + prev_output_is_paragraph = False + except Exception as e: + print(f"--------------------\nError parsing {menu_item['category']}\n") + raise e + + # Write all content to a single markdown file + output_file = Path(__file__).parent.parent / "public" / "llms.txt" + + # Write to file + output_file.write_text("\n".join(output), encoding="utf-8") + print(f"Successfully generated {output_file}") + + +if __name__ == "__main__": + main() From 55047faea7f67a761e7174575e32b218efe2ea59 Mon Sep 17 00:00:00 2001 From: Thiago Teixeira Date: Tue, 16 Sep 2025 07:38:30 -0300 Subject: [PATCH 2/4] Make generate_llms_txt.py read descriptions from MD as well. --- content/develop/_index.md | 1 + .../button-behavior-and-examples.md | 1 + .../concepts/app-design/custom-classes.md | 1 + .../develop/concepts/app-design/dataframes.md | 1 + .../concepts/app-design/multithreading.md | 1 + .../concepts/app-design/timezone-handling.md | 1 + .../develop/concepts/architecture/_index.md | 1 + .../concepts/architecture/app-chrome.md | 1 + .../concepts/architecture/architecture.md | 1 + .../develop/concepts/architecture/caching.md | 1 + .../develop/concepts/architecture/forms.md | 1 + .../concepts/architecture/fragments.md | 1 + .../concepts/architecture/session-state.md | 1 + .../concepts/architecture/widget-behavior.md | 1 + .../develop/concepts/configuration/_index.md | 1 + .../develop/concepts/configuration/options.md | 1 + .../develop/concepts/configuration/theming.md | 1 + .../concepts/connections/authentication.md | 1 + .../connections/connecting-to-data.md | 1 + .../connections/secrets-management.md | 1 + .../connections/security-reminders.md | 1 + .../concepts/custom-components/_index.md | 1 + .../custom-components/publish-component.md | 1 + content/get-started/installation/_index.md | 1 + content/menu.md | 368 ------------------ python/generate_llms_full_txt.py | 6 +- python/generate_llms_txt.py | 35 +- 27 files changed, 58 insertions(+), 375 deletions(-) diff --git a/content/develop/_index.md b/content/develop/_index.md index f8d342e41..cf6fab645 100644 --- a/content/develop/_index.md +++ b/content/develop/_index.md @@ -1,6 +1,7 @@ --- title: Develop slug: /develop +description: All the information you need to build beautiful, performant web apps with Streamlit. --- # Develop diff --git a/content/develop/concepts/app-design/button-behavior-and-examples.md b/content/develop/concepts/app-design/button-behavior-and-examples.md index bf03470c3..e77a4271e 100644 --- a/content/develop/concepts/app-design/button-behavior-and-examples.md +++ b/content/develop/concepts/app-design/button-behavior-and-examples.md @@ -1,6 +1,7 @@ --- title: Button behavior and examples slug: /develop/concepts/design/buttons +description: Buttons created with `st.button` do not retain state. This comes with some complexity. --- # Button behavior and examples diff --git a/content/develop/concepts/app-design/custom-classes.md b/content/develop/concepts/app-design/custom-classes.md index 3d7839425..2f4fbefa1 100644 --- a/content/develop/concepts/app-design/custom-classes.md +++ b/content/develop/concepts/app-design/custom-classes.md @@ -1,6 +1,7 @@ --- title: Using custom Python classes in your Streamlit app slug: /develop/concepts/design/custom-classes +description: Design patterns for using custom classes in Streamlit. For example, if defining your own custom classes, do it in a separate module. --- # Using custom Python classes in your Streamlit app diff --git a/content/develop/concepts/app-design/dataframes.md b/content/develop/concepts/app-design/dataframes.md index 83f87c89d..43d29d053 100644 --- a/content/develop/concepts/app-design/dataframes.md +++ b/content/develop/concepts/app-design/dataframes.md @@ -1,6 +1,7 @@ --- title: Dataframes slug: /develop/concepts/design/dataframes +description: Dataframes are a great way to display and edit data in a tabular format. --- # Dataframes diff --git a/content/develop/concepts/app-design/multithreading.md b/content/develop/concepts/app-design/multithreading.md index 1bad6c10b..aac34d6be 100644 --- a/content/develop/concepts/app-design/multithreading.md +++ b/content/develop/concepts/app-design/multithreading.md @@ -1,6 +1,7 @@ --- title: Threading in Streamlit slug: /develop/concepts/design/multithreading +description: How Streamlit uses multiple threads in its design. --- # Multithreading in Streamlit diff --git a/content/develop/concepts/app-design/timezone-handling.md b/content/develop/concepts/app-design/timezone-handling.md index 3a869a177..1c71ffb59 100644 --- a/content/develop/concepts/app-design/timezone-handling.md +++ b/content/develop/concepts/app-design/timezone-handling.md @@ -1,6 +1,7 @@ --- title: Working with timezones slug: /develop/concepts/design/timezone-handling +description: Understand how Streamlit handles time zones. --- # Working with timezones diff --git a/content/develop/concepts/architecture/_index.md b/content/develop/concepts/architecture/_index.md index be3cbf3f8..1a8ff3e7a 100644 --- a/content/develop/concepts/architecture/_index.md +++ b/content/develop/concepts/architecture/_index.md @@ -1,6 +1,7 @@ --- title: Working with Streamlit's execution model slug: /develop/concepts/architecture +description: Learn how to start your Streamlit app. Understand Streamlit's client-server architecture and related considerations. --- # Working with Streamlit's execution model diff --git a/content/develop/concepts/architecture/app-chrome.md b/content/develop/concepts/architecture/app-chrome.md index c48389e54..e0e86ff2c 100644 --- a/content/develop/concepts/architecture/app-chrome.md +++ b/content/develop/concepts/architecture/app-chrome.md @@ -1,6 +1,7 @@ --- title: The app chrome slug: /develop/concepts/architecture/app-chrome +description: Explains the widgets in the top right of your Streamlit app. These widgets help you in development, and also help your viewers as they use your app. --- # The app chrome diff --git a/content/develop/concepts/architecture/architecture.md b/content/develop/concepts/architecture/architecture.md index 571aa8606..101929815 100644 --- a/content/develop/concepts/architecture/architecture.md +++ b/content/develop/concepts/architecture/architecture.md @@ -1,6 +1,7 @@ --- title: Understanding Streamlit's client-server architecture slug: /develop/concepts/architecture/architecture +description: Streamlit apps have a client-server structure. The Python backend of your app is the server. The frontend you view through a browser is the client. --- # Understanding Streamlit's client-server architecture diff --git a/content/develop/concepts/architecture/caching.md b/content/develop/concepts/architecture/caching.md index cd1135075..726b8a025 100644 --- a/content/develop/concepts/architecture/caching.md +++ b/content/develop/concepts/architecture/caching.md @@ -1,6 +1,7 @@ --- title: Caching overview slug: /develop/concepts/architecture/caching +description: Use `@st.cache_resource` and `@st.cache_data` to speed up your app. --- # Caching overview diff --git a/content/develop/concepts/architecture/forms.md b/content/develop/concepts/architecture/forms.md index 63b5973d4..c87bcf0a2 100644 --- a/content/develop/concepts/architecture/forms.md +++ b/content/develop/concepts/architecture/forms.md @@ -1,6 +1,7 @@ --- title: Using forms slug: /develop/concepts/architecture/forms +description: Use `st.form` when you don't want to rerun your script with every input made by a user. --- # Using forms diff --git a/content/develop/concepts/architecture/fragments.md b/content/develop/concepts/architecture/fragments.md index 6b0fff982..2c4659589 100644 --- a/content/develop/concepts/architecture/fragments.md +++ b/content/develop/concepts/architecture/fragments.md @@ -1,6 +1,7 @@ --- title: Working with fragments slug: /develop/concepts/architecture/fragments +description: Use `st.fragment` to rerun only a subsection of your app when a user interacts, or on a timer. --- # Working with fragments diff --git a/content/develop/concepts/architecture/session-state.md b/content/develop/concepts/architecture/session-state.md index 40eb3d247..adba99fd1 100644 --- a/content/develop/concepts/architecture/session-state.md +++ b/content/develop/concepts/architecture/session-state.md @@ -1,6 +1,7 @@ --- title: Add statefulness to apps slug: /develop/concepts/architecture/session-state +description: Use session state to store data that persists across app reruns during a user's session. (A session is connected to a browser tab) --- # Add statefulness to apps diff --git a/content/develop/concepts/architecture/widget-behavior.md b/content/develop/concepts/architecture/widget-behavior.md index e9f854f68..2f7ebae95 100644 --- a/content/develop/concepts/architecture/widget-behavior.md +++ b/content/develop/concepts/architecture/widget-behavior.md @@ -1,6 +1,7 @@ --- title: Widget behavior slug: /develop/concepts/architecture/widget-behavior +description: Learn about widgets (like `st.button`, `st.selectbox`, and `st.text_input`), which are at the heart of Streamlit apps. --- # Understanding widget behavior diff --git a/content/develop/concepts/configuration/_index.md b/content/develop/concepts/configuration/_index.md index 1c1053b37..7aa658439 100644 --- a/content/develop/concepts/configuration/_index.md +++ b/content/develop/concepts/configuration/_index.md @@ -1,6 +1,7 @@ --- title: Configure and customize your app slug: /develop/concepts/configuration +description: Configure Streamlit and change its looks with `.streamlit/config.toml`. --- # Configure and customize your app diff --git a/content/develop/concepts/configuration/options.md b/content/develop/concepts/configuration/options.md index 6816a5bb7..ec880e4ad 100644 --- a/content/develop/concepts/configuration/options.md +++ b/content/develop/concepts/configuration/options.md @@ -1,6 +1,7 @@ --- title: Working with configuration options slug: /develop/concepts/configuration/options +description: Learn about every config option. Also available with the command `streamlit config show`. --- # Working with configuration options diff --git a/content/develop/concepts/configuration/theming.md b/content/develop/concepts/configuration/theming.md index 4a7c8d934..583a72506 100644 --- a/content/develop/concepts/configuration/theming.md +++ b/content/develop/concepts/configuration/theming.md @@ -1,6 +1,7 @@ --- title: Theming slug: /develop/concepts/configuration/theming +description: The preferred way to change how a Streamlit app looks is with themes in `.streamlit/config.toml`. --- # Theming overview diff --git a/content/develop/concepts/connections/authentication.md b/content/develop/concepts/connections/authentication.md index c68ce4038..d44f63bfd 100644 --- a/content/develop/concepts/connections/authentication.md +++ b/content/develop/concepts/connections/authentication.md @@ -1,6 +1,7 @@ --- title: User authentication and information slug: /develop/concepts/connections/authentication +description: Simple authentication with OIDC / OAuth2 via `.streamlimt/secrets.toml`, `st.login`, `st.logout`, and `st.user`. --- # User authentication and information diff --git a/content/develop/concepts/connections/connecting-to-data.md b/content/develop/concepts/connections/connecting-to-data.md index 8f812d6cc..2a3fb8642 100644 --- a/content/develop/concepts/connections/connecting-to-data.md +++ b/content/develop/concepts/connections/connecting-to-data.md @@ -1,6 +1,7 @@ --- title: Connecting to data slug: /develop/concepts/connections/connecting-to-data +description: Connect to data source using plain Python, or use Streamlit's `st.connection` for some nice extras. --- # Connecting to data diff --git a/content/develop/concepts/connections/secrets-management.md b/content/develop/concepts/connections/secrets-management.md index 3e3521f4d..97de351e0 100644 --- a/content/develop/concepts/connections/secrets-management.md +++ b/content/develop/concepts/connections/secrets-management.md @@ -1,6 +1,7 @@ --- title: Secrets management slug: /develop/concepts/connections/secrets-management +description: Place secrets at `.streamlit/secrets.toml` and access them with `st.secrets`. --- # Secrets management diff --git a/content/develop/concepts/connections/security-reminders.md b/content/develop/concepts/connections/security-reminders.md index d5b596da8..2caedada3 100644 --- a/content/develop/concepts/connections/security-reminders.md +++ b/content/develop/concepts/connections/security-reminders.md @@ -1,6 +1,7 @@ --- title: Security reminders slug: /develop/concepts/connections/security-reminders +description: Best practices to secure your Streamlit app. --- # Security reminders diff --git a/content/develop/concepts/custom-components/_index.md b/content/develop/concepts/custom-components/_index.md index 38aae6ec1..20ed1184a 100644 --- a/content/develop/concepts/custom-components/_index.md +++ b/content/develop/concepts/custom-components/_index.md @@ -1,6 +1,7 @@ --- title: Components slug: /develop/concepts/custom-components +description: Use custom components (or build your own!) to extend Streamlit. --- # Custom Components diff --git a/content/develop/concepts/custom-components/publish-component.md b/content/develop/concepts/custom-components/publish-component.md index 36eee3066..293a1d0cf 100644 --- a/content/develop/concepts/custom-components/publish-component.md +++ b/content/develop/concepts/custom-components/publish-component.md @@ -1,6 +1,7 @@ --- title: Publish a Component slug: /develop/concepts/custom-components/publish +description: Custom components are published in PyPI like any Python package. --- # Publish a Component diff --git a/content/get-started/installation/_index.md b/content/get-started/installation/_index.md index ef8123c83..ce3628efc 100644 --- a/content/get-started/installation/_index.md +++ b/content/get-started/installation/_index.md @@ -1,6 +1,7 @@ --- title: Install Streamlit slug: /get-started/installation +description: It's just `pip install streamlit`. But read for more details and alternatives. --- # Install Streamlit diff --git a/content/menu.md b/content/menu.md index 3c6bdd486..2ab7bff88 100644 --- a/content/menu.md +++ b/content/menu.md @@ -2,1338 +2,970 @@ site_menu: - category: Get started url: /get-started - description: color: orange-70 icon: rocket_launch - category: Get started / Installation url: /get-started/installation - description: It's just `pip install streamlit`. But read for more details and alternatives. - category: Get started / Installation / Use command line url: /get-started/installation/command-line - description: - category: Get started / Installation / Use Anaconda Distribution url: /get-started/installation/anaconda-distribution - description: - category: Get started / Installation / Use GitHub Codespaces url: /get-started/installation/community-cloud - description: - category: Get started / Installation / Use Snowflake url: /get-started/installation/streamlit-in-snowflake - description: - category: Get started / Fundamentals url: /get-started/fundamentals - description: - category: Get started / Fundamentals / Basic concepts url: /get-started/fundamentals/main-concepts - description: - category: Get started / Fundamentals / Advanced concepts url: /get-started/fundamentals/advanced-concepts - description: - category: Get started / Fundamentals / Additional features url: /get-started/fundamentals/additional-features - description: - category: Get started / Fundamentals / Summary url: /get-started/fundamentals/summary - description: - category: Get started / First steps url: /get-started/tutorials - description: - category: Get started / First steps / Create an app url: /get-started/tutorials/create-an-app - description: - category: Get started / First steps / Create a multipage app url: /get-started/tutorials/create-a-multipage-app - description: - category: Develop url: /develop - description: All the information you need to build beautiful, performant web apps with Streamlit. color: indigo-70 icon: code - category: Develop / Concepts url: /develop/concepts - description: - category: Develop / Concepts / CORE - category: Develop / Concepts / Architecture and execution url: /develop/concepts/architecture - description: Understand how to start your Streamlit app. Understand Streamlit's client-server architecture and related considerations. - category: Develop / Concepts / Architecture and execution / Running your app url: /develop/concepts/architecture/run-your-app - description: - category: Develop / Concepts / Architecture and execution / Streamlit's architecture url: /develop/concepts/architecture/architecture - description: Streamlit apps have a client-server structure. The Python backend of your app is the server. The frontend you view through a browser is the client. - category: Develop / Concepts / Architecture and execution / The app chrome url: /develop/concepts/architecture/app-chrome - description: Explains the widgets in the top right of your Streamlit app. These widgets help you in development, and also help your viewers as they use your app. - category: Develop / Concepts / Architecture and execution / Caching url: /develop/concepts/architecture/caching - description: Use `@st.cache_resource` and `@st.cache_data` to speed up your app. - category: Develop / Concepts / Architecture and execution / Session State url: /develop/concepts/architecture/session-state - description: Use session state to store data that persists across app reruns during a user's session. (A session is connected to a browser tab) - category: Develop / Concepts / Architecture and execution / Forms url: /develop/concepts/architecture/forms - description: Use `st.form` when you don't want to rerun your script with every input made by a user. - category: Develop / Concepts / Architecture and execution / Fragments url: /develop/concepts/architecture/fragments - description: Use `st.fragment` to rerun only a subsection of your app when a user interacts, or on a timer. - category: Develop / Concepts / Architecture and execution/ Widget behavior url: /develop/concepts/architecture/widget-behavior - description: Learn about widgets (like `st.button`, `st.selectbox`, and `st.text_input`), which are at the heart of Streamlit apps. - category: Develop / Concepts / Multipage apps url: /develop/concepts/multipage-apps - description: - category: Develop / Concepts / Multipage apps / Overview url: /develop/concepts/multipage-apps/overview - description: Streamlit provides two built-in mechanisms for creating multipage apps. `st.navigation` and the `pages/` directory. - category: Develop / Concepts / Multipage apps / Page and navigation url: /develop/concepts/multipage-apps/page-and-navigation - description: Describes how to use `st.Page` and `st.navigation` to define multipage apps. This is the preferred method. - category: Develop / Concepts / Multipage apps / Pages directory url: /develop/concepts/multipage-apps/pages-directory - description: Describes how to use the `pages/` directory to define multiple pages. - category: Develop / Concepts / Multipage apps / Working with widgets url: /develop/concepts/multipage-apps/widgets - description: - category: Develop / Concepts / App design url: /develop/concepts/design - description: How to create dynamic, animated content or update elements without rerunning your app. - category: Develop / Concepts / App design / Animate and update elements url: /develop/concepts/design/animate - description: Display a chart or dataframe and modify it live as the app runs (for example, in a loop). - category: Develop / Concepts / App design / Button behavior and examples url: /develop/concepts/design/buttons - description: Buttons created with `st.button` do not retain state. This comes with some complexity. - category: Develop / Concepts / App design / Dataframes url: /develop/concepts/design/dataframes - description: Dataframes are a great way to display and edit data in a tabular format. - category: Develop / Concepts / App design / Multithreading url: /develop/concepts/design/multithreading - description: How Streamlit uses multiple threads in its design. - category: Develop / Concepts / App design / Using custom classes url: /develop/concepts/design/custom-classes - description: Design patterns for using custom classes in Streamlit. For example, if defining your own custom classes, do it in a separate module. - category: Develop / Concepts / App design / Working with timezones url: /develop/concepts/design/timezone-handling - description: Understand how Streamlit handles time zones. - category: Develop / Concepts / ADDITIONAL - category: Develop / Concepts / Connections, secrets, and authentication url: /develop/concepts/connections - description: - category: Develop / Concepts / Connections, secrets, and authentication / Connecting to data url: /develop/concepts/connections/connecting-to-data - description: Connect to data source using plain Python, or use Streamlit's `st.connection` for some nice extras. - category: Develop / Concepts / Connections, secrets, and authentication / Secrets management url: /develop/concepts/connections/secrets-management - description: Place secrets at `.streamlit/secrets.toml` and access them with `st.secrets`. - category: Develop / Concepts / Connections, secrets, and authentication / User authentication url: /develop/concepts/connections/authentication - description: Simple authentication with OIDC / OAuth2 via `.streamlimt/secrets.toml`, `st.login`, `st.logout`, and `st.user`. - category: Develop / Concepts / Connections, secrets, and authentication / Security reminders url: /develop/concepts/connections/security-reminders - description: Best practices to secure your Streamlit app. - category: Develop / Concepts / Custom components url: /develop/concepts/custom-components - description: Use custom components (or build your own!) to extend Streamlit. - category: Develop / Concepts / Custom components / Intro to custom components url: /develop/concepts/custom-components/intro - description: - category: Develop / Concepts / Custom components / Create a Component url: /develop/concepts/custom-components/create - description: - category: Develop / Concepts / Custom components / Publish a Component url: /develop/concepts/custom-components/publish - description: Custom components are published in PyPI like any Python package. - category: Develop / Concepts / Custom components / Limitations url: /develop/concepts/custom-components/limitations - description: - category: Develop / Concepts / Custom components / Component gallery url: https://streamlit.io/components - description: - category: Develop / Concepts / Configuration and theming url: /develop/concepts/configuration - description: Configure Streamlit and change its looks with `.streamlit/config.toml`. - category: Develop / Concepts / Configuration and theming / Configuration options url: /develop/concepts/configuration/options - description: Learn about every config option. Also available with the command `streamlit config show`. - category: Develop / Concepts / Configuration and theming / HTTPS support url: /develop/concepts/configuration/https-support - description: - category: Develop / Concepts / Configuration and theming / Serving static files url: /develop/concepts/configuration/serving-static-files - description: - category: Develop / Concepts / Configuration and theming / THEMING - category: Develop / Concepts / Configuration and theming / Customize your theme url: /develop/concepts/configuration/theming - description: The preferred way to change how a Streamlit app looks is with themes in `.streamlit/config.toml`. - category: Develop / Concepts / Configuration and theming / Customize colors and borders url: /develop/concepts/configuration/theming-customize-colors-and-borders - description: - category: Develop / Concepts / Configuration and theming / Customize fonts url: /develop/concepts/configuration/theming-customize-fonts - description: - category: Develop / Concepts / App testing url: /develop/concepts/app-testing - description: - category: Develop / Concepts / App testing / Get started url: /develop/concepts/app-testing/get-started - description: - category: Develop / Concepts / App testing / Beyond the basics url: /develop/concepts/app-testing/beyond-the-basics - description: - category: Develop / Concepts / App testing / Automate your tests url: /develop/concepts/app-testing/automate-tests - description: - category: Develop / Concepts / App testing / Example url: /develop/concepts/app-testing/examples - description: - category: Develop / Concepts / App testing / Cheat sheet url: /develop/concepts/app-testing/cheat-sheet - description: - category: Develop / API reference url: /develop/api-reference - description: - category: Develop / API reference / PAGE ELEMENTS - category: Develop / API reference / Write and magic url: /develop/api-reference/write-magic - description: - category: Develop / API reference / Write and magic / st.write url: /develop/api-reference/write-magic/st.write - description: isVersioned: true - category: Develop / API reference / Write and magic / st.write_stream url: /develop/api-reference/write-magic/st.write_stream - description: isVersioned: true - category: Develop / API reference / Write and magic / magic url: /develop/api-reference/write-magic/magic - description: - category: Develop / API reference / Text elements url: /develop/api-reference/text - description: - category: Develop / API reference / Text elements / HEADINGS AND BODY - category: Develop / API reference / Text elements / st.title url: /develop/api-reference/text/st.title - description: isVersioned: true - category: Develop / API reference / Text elements / st.header url: /develop/api-reference/text/st.header - description: isVersioned: true - category: Develop / API reference / Text elements / st.subheader url: /develop/api-reference/text/st.subheader - description: isVersioned: true - category: Develop / API reference / Text elements / st.markdown url: /develop/api-reference/text/st.markdown - description: isVersioned: true - category: Develop / API reference / Text elements / FORMATTED TEXT - category: Develop / API reference / Text elements / st.badge url: /develop/api-reference/text/st.badge - description: isVersioned: true - category: Develop / API reference / Text elements / st.caption url: /develop/api-reference/text/st.caption - description: isVersioned: true - category: Develop / API reference / Text elements / st.code url: /develop/api-reference/text/st.code - description: isVersioned: true - category: Develop / API reference / Text elements / st.divider url: /develop/api-reference/text/st.divider - description: isVersioned: true - category: Develop / API reference / Text elements / st.echo url: /develop/api-reference/text/st.echo - description: isVersioned: true - category: Develop / API reference / Text elements / st.latex url: /develop/api-reference/text/st.latex - description: isVersioned: true - category: Develop / API reference / Text elements / st.text url: /develop/api-reference/text/st.text - description: isVersioned: true - category: Develop / API reference / Text elements / UTILITIES - category: Develop / API reference / Text elements / st.help url: /develop/api-reference/text/st.help - description: isVersioned: true - category: Develop / API reference / Text elements / st.html url: /develop/api-reference/text/st.html - description: isVersioned: true - category: Develop / API reference / Data elements url: /develop/api-reference/data - description: - category: Develop / API reference / Data elements / st.dataframe url: /develop/api-reference/data/st.dataframe - description: isVersioned: true - category: Develop / API reference / Data elements / st.data_editor url: /develop/api-reference/data/st.data_editor - description: isVersioned: true - category: Develop / API reference / Data elements / st.column_config url: /develop/api-reference/data/st.column_config - description: - category: Develop / API reference / Data elements / st.column_config / Column url: /develop/api-reference/data/st.column_config/st.column_config.column - description: isVersioned: true - category: Develop / API reference / Data elements / st.column_config / Text column url: /develop/api-reference/data/st.column_config/st.column_config.textcolumn - description: isVersioned: true - category: Develop / API reference / Data elements / st.column_config / Number column url: /develop/api-reference/data/st.column_config/st.column_config.numbercolumn - description: isVersioned: true - category: Develop / API reference / Data elements / st.column_config / Checkbox column url: /develop/api-reference/data/st.column_config/st.column_config.checkboxcolumn - description: isVersioned: true - category: Develop / API reference / Data elements / st.column_config / Selectbox column url: /develop/api-reference/data/st.column_config/st.column_config.selectboxcolumn - description: isVersioned: true - category: Develop / API reference / Data elements / st.column_config / Datetime column url: /develop/api-reference/data/st.column_config/st.column_config.datetimecolumn - description: isVersioned: true - category: Develop / API reference / Data elements / st.column_config / Date column url: /develop/api-reference/data/st.column_config/st.column_config.datecolumn - description: isVersioned: true - category: Develop / API reference / Data elements / st.column_config / Time column url: /develop/api-reference/data/st.column_config/st.column_config.timecolumn - description: isVersioned: true - category: Develop / API reference / Data elements / st.column_config / JSON column url: /develop/api-reference/data/st.column_config/st.column_config.jsoncolumn - description: isVersioned: true - category: Develop / API reference / Data elements / st.column_config / List column url: /develop/api-reference/data/st.column_config/st.column_config.listcolumn - description: isVersioned: true - category: Develop / API reference / Data elements / st.column_config / Link column url: /develop/api-reference/data/st.column_config/st.column_config.linkcolumn - description: isVersioned: true - category: Develop / API reference / Data elements / st.column_config / Image column url: /develop/api-reference/data/st.column_config/st.column_config.imagecolumn - description: isVersioned: true - category: Develop / API reference / Data elements / st.column_config / Area chart column url: /develop/api-reference/data/st.column_config/st.column_config.areachartcolumn - description: isVersioned: true - category: Develop / API reference / Data elements / st.column_config / Line chart column url: /develop/api-reference/data/st.column_config/st.column_config.linechartcolumn - description: isVersioned: true - category: Develop / API reference / Data elements / st.column_config / Bar chart column url: /develop/api-reference/data/st.column_config/st.column_config.barchartcolumn - description: isVersioned: true - category: Develop / API reference / Data elements / st.column_config / Progress column url: /develop/api-reference/data/st.column_config/st.column_config.progresscolumn - description: isVersioned: true - category: Develop / API reference / Data elements / st.table url: /develop/api-reference/data/st.table - description: isVersioned: true - category: Develop / API reference / Data elements / st.metric url: /develop/api-reference/data/st.metric - description: isVersioned: true - category: Develop / API reference / Data elements / st.json url: /develop/api-reference/data/st.json - description: isVersioned: true - category: Develop / API reference / Data elements / st.experimental_data_editor url: /develop/api-reference/data/st.experimental_data_editor - description: isVersioned: true isDeprecated: true visible: false - category: Develop / API reference / Chart elements url: /develop/api-reference/charts - description: - category: Develop / API reference / Chart elements / SIMPLE - category: Develop / API reference / Chart elements / st.area_chart url: /develop/api-reference/charts/st.area_chart - description: isVersioned: true - category: Develop / API reference / Chart elements / st.bar_chart url: /develop/api-reference/charts/st.bar_chart - description: isVersioned: true - category: Develop / API reference / Chart elements / st.line_chart url: /develop/api-reference/charts/st.line_chart - description: isVersioned: true - category: Develop / API reference / Chart elements / st.map url: /develop/api-reference/charts/st.map - description: isVersioned: true - category: Develop / API reference / Chart elements / st.scatter_chart url: /develop/api-reference/charts/st.scatter_chart - description: isVersioned: true - category: Develop / API reference / Chart elements / ADVANCED - category: Develop / API reference / Chart elements / st.altair_chart url: /develop/api-reference/charts/st.altair_chart - description: isVersioned: true - category: Develop / API reference / Chart elements / st.bokeh_chart url: /develop/api-reference/charts/st.bokeh_chart - description: isVersioned: true - category: Develop / API reference / Chart elements / st.graphviz_chart url: /develop/api-reference/charts/st.graphviz_chart - description: isVersioned: true - category: Develop / API reference / Chart elements / st.plotly_chart url: /develop/api-reference/charts/st.plotly_chart - description: isVersioned: true - category: Develop / API reference / Chart elements / st.pydeck_chart url: /develop/api-reference/charts/st.pydeck_chart - description: isVersioned: true - category: Develop / API reference / Chart elements / st.pyplot url: /develop/api-reference/charts/st.pyplot - description: isVersioned: true - category: Develop / API reference / Chart elements / st.vega_lite_chart url: /develop/api-reference/charts/st.vega_lite_chart - description: isVersioned: true - category: Develop / API reference / Input widgets url: /develop/api-reference/widgets - description: - category: Develop / API reference / Input widgets / BUTTONS - category: Develop / API reference / Input widgets / st.button url: /develop/api-reference/widgets/st.button - description: isVersioned: true - category: Develop / API reference / Input widgets / st.download_button url: /develop/api-reference/widgets/st.download_button - description: isVersioned: true - category: Develop / API reference / Input widgets / st.form_submit_button url: https://docs.streamlit.io/develop/api-reference/execution-flow/st.form_submit_button - description: isVersioned: true - category: Develop / API reference / Input widgets / st.link_button url: /develop/api-reference/widgets/st.link_button - description: isVersioned: true - category: Develop / API reference / Input widgets / st.page_link url: /develop/api-reference/widgets/st.page_link - description: isVersioned: true - category: Develop / API reference / Input widgets / SELECTIONS - category: Develop / API reference / Input widgets / st.checkbox url: /develop/api-reference/widgets/st.checkbox - description: isVersioned: true - category: Develop / API reference / Input widgets / st.color_picker url: /develop/api-reference/widgets/st.color_picker - description: isVersioned: true - category: Develop / API reference / Input widgets / st.feedback url: /develop/api-reference/widgets/st.feedback - description: isVersioned: true - category: Develop / API reference / Input widgets / st.multiselect url: /develop/api-reference/widgets/st.multiselect - description: isVersioned: true - category: Develop / API reference / Input widgets / st.pills url: /develop/api-reference/widgets/st.pills - description: isVersioned: true - category: Develop / API reference / Input widgets / st.radio url: /develop/api-reference/widgets/st.radio - description: isVersioned: true - category: Develop / API reference / Input widgets / st.segmented_control url: /develop/api-reference/widgets/st.segmented_control - description: isVersioned: true - category: Develop / API reference / Input widgets / st.selectbox url: /develop/api-reference/widgets/st.selectbox - description: isVersioned: true - category: Develop / API reference / Input widgets / st.select_slider url: /develop/api-reference/widgets/st.select_slider - description: isVersioned: true - category: Develop / API reference / Input widgets / st.toggle url: /develop/api-reference/widgets/st.toggle - description: isVersioned: true - category: Develop / API reference / Input widgets / NUMERIC - category: Develop / API reference / Input widgets / st.number_input url: /develop/api-reference/widgets/st.number_input - description: isVersioned: true - category: Develop / API reference / Input widgets / st.slider url: /develop/api-reference/widgets/st.slider - description: isVersioned: true - category: Develop / API reference / Input widgets / DATE AND TIME - category: Develop / API reference / Input widgets / st.date_input url: /develop/api-reference/widgets/st.date_input - description: isVersioned: true - category: Develop / API reference / Input widgets / st.time_input url: /develop/api-reference/widgets/st.time_input - description: isVersioned: true - category: Develop / API reference / Input widgets / TEXT - category: Develop / API reference / Input widgets / st.chat_input url: https://docs.streamlit.io/develop/api-reference/chat/st.chat_input - description: isVersioned: true - category: Develop / API reference / Input widgets / st.text_area url: /develop/api-reference/widgets/st.text_area - description: isVersioned: true - category: Develop / API reference / Input widgets / st.text_input url: /develop/api-reference/widgets/st.text_input - description: isVersioned: true - category: Develop / API reference / Input widgets / MEDIA AND FILES - category: Develop / API reference / Input widgets / st.audio_input url: /develop/api-reference/widgets/st.audio_input - description: isVersioned: true - category: Develop / API reference / Input widgets / st.camera_input url: /develop/api-reference/widgets/st.camera_input - description: isVersioned: true - category: Develop / API reference / Input widgets / st.data_editor url: https://docs.streamlit.io/develop/api-reference/data/st.data_editor - description: isVersioned: true - category: Develop / API reference / Input widgets / st.file_uploader url: /develop/api-reference/widgets/st.file_uploader - description: isVersioned: true - category: Develop / API reference / Media elements url: /develop/api-reference/media - description: - category: Develop / API reference / Media elements / st.audio url: /develop/api-reference/media/st.audio - description: isVersioned: true - category: Develop / API reference / Media elements / st.image url: /develop/api-reference/media/st.image - description: isVersioned: true - category: Develop / API reference / Media elements / st.logo url: /develop/api-reference/media/st.logo - description: isVersioned: true - category: Develop / API reference / Media elements / st.pdf url: /develop/api-reference/media/st.pdf - description: isVersioned: true - category: Develop / API reference / Media elements / st.video url: /develop/api-reference/media/st.video - description: isVersioned: true - category: Develop / API reference / Layouts and containers url: /develop/api-reference/layout - description: - category: Develop / API reference / Layouts and containers / st.columns url: /develop/api-reference/layout/st.columns - description: isVersioned: true - category: Develop / API reference / Layouts and containers / st.container url: /develop/api-reference/layout/st.container - description: isVersioned: true - category: Develop / API reference / Layouts and containers / st.dialog url: https://docs.streamlit.io/develop/api-reference/execution-flow/st.dialog - description: isVersioned: true - category: Develop / API reference / Layouts and containers / st.empty url: /develop/api-reference/layout/st.empty - description: isVersioned: true - category: Develop / API reference / Layouts and containers / st.expander url: /develop/api-reference/layout/st.expander - description: isVersioned: true - category: Develop / API reference / Layouts and containers / st.form url: https://docs.streamlit.io/develop/api-reference/execution-flow/st.form - description: isVersioned: true - category: Develop / API reference / Layouts and containers / st.popover url: /develop/api-reference/layout/st.popover - description: isVersioned: true - category: Develop / API reference / Layouts and containers / st.sidebar url: /develop/api-reference/layout/st.sidebar - description: isVersioned: true - category: Develop / API reference / Layouts and containers / st.tabs url: /develop/api-reference/layout/st.tabs - description: isVersioned: true - category: Develop / API reference / Chat elements url: /develop/api-reference/chat - description: - category: Develop / API reference / Chat elements / st.chat_input url: /develop/api-reference/chat/st.chat_input - description: isVersioned: true - category: Develop / API reference / Chat elements / st.chat_message url: /develop/api-reference/chat/st.chat_message - description: isVersioned: true - category: Develop / API reference / Chat elements / st.status url: https://docs.streamlit.io/develop/api-reference/status/st.status - description: isVersioned: true - category: Develop / API reference / Chat elements / st.write_stream url: https://docs.streamlit.io/develop/api-reference/write-magic/st.write_stream - description: isVersioned: true - category: Develop / API reference / Status elements url: /develop/api-reference/status - description: - category: Develop / API reference / Status elements / CALLOUTS - category: Develop / API reference / Status elements / st.success url: /develop/api-reference/status/st.success - description: isVersioned: true - category: Develop / API reference / Status elements / st.info url: /develop/api-reference/status/st.info - description: isVersioned: true - category: Develop / API reference / Status elements / st.warning url: /develop/api-reference/status/st.warning - description: isVersioned: true - category: Develop / API reference / Status elements / st.error url: /develop/api-reference/status/st.error - description: isVersioned: true - category: Develop / API reference / Status elements / st.exception url: /develop/api-reference/status/st.exception - description: isVersioned: true - category: Develop / API reference / Status elements / OTHER - category: Develop / API reference / Status elements / st.progress url: /develop/api-reference/status/st.progress - description: isVersioned: true - category: Develop / API reference / Status elements / st.spinner url: /develop/api-reference/status/st.spinner - description: isVersioned: true - category: Develop / API reference / Status elements / st.status url: /develop/api-reference/status/st.status - description: isVersioned: true - category: Develop / API reference / Status elements / st.toast url: /develop/api-reference/status/st.toast - description: isVersioned: true - category: Develop / API reference / Status elements / st.balloons url: /develop/api-reference/status/st.balloons - description: isVersioned: true - category: Develop / API reference / Status elements / st.snow url: /develop/api-reference/status/st.snow - description: isVersioned: true - category: Develop / API reference / Third-party components url: https://streamlit.io/components - description: - category: Develop / API reference / APPLICATION LOGIC - category: Develop / API reference / Authentication and user info url: /develop/api-reference/user - description: - category: Develop / API reference / Authentication and user info / st.login url: /develop/api-reference/user/st.login - description: isVersioned: true - category: Develop / API reference / Authentication and user info / st.logout url: /develop/api-reference/user/st.logout - description: isVersioned: true - category: Develop / API reference / Authentication and user info / st.user url: /develop/api-reference/user/st.user - description: isVersioned: true - category: Develop / API reference / Navigation and pages url: /develop/api-reference/navigation - description: - category: Develop / API reference / Navigation and pages / st.navigation url: /develop/api-reference/navigation/st.navigation - description: isVersioned: true - category: Develop / API reference / Navigation and pages / st.Page url: /develop/api-reference/navigation/st.page - description: isVersioned: true - category: Develop / API reference / Navigation and pages / st.page_link url: https://docs.streamlit.io/develop/api-reference/widgets/st.page_link - description: isVersioned: true - category: Develop / API reference / Navigation and pages / st.switch_page url: /develop/api-reference/navigation/st.switch_page - description: isVersioned: true - category: Develop / API reference / Execution flow url: /develop/api-reference/execution-flow - description: - category: Develop / API reference / Execution flow / st.dialog url: /develop/api-reference/execution-flow/st.dialog - description: isVersioned: true - category: Develop / API reference / Execution flow / st.form url: /develop/api-reference/execution-flow/st.form - description: isVersioned: true - category: Develop / API reference / Execution flow / st.form_submit_button url: /develop/api-reference/execution-flow/st.form_submit_button - description: isVersioned: true - category: Develop / API reference / Execution flow / st.fragment url: /develop/api-reference/execution-flow/st.fragment - description: isVersioned: true - category: Develop / API reference / Execution flow / st.rerun url: /develop/api-reference/execution-flow/st.rerun - description: isVersioned: true - category: Develop / API reference / Execution flow / st.stop url: /develop/api-reference/execution-flow/st.stop - description: isVersioned: true - category: Develop / API reference / Execution flow / st.experimental_rerun url: /develop/api-reference/execution-flow/st.experimental_rerun - description: isVersioned: true isDeprecated: true visible: false - category: Develop / API reference / Caching and state url: /develop/api-reference/caching-and-state - description: - category: Develop / API reference / Caching and state / SERVER - category: Develop / API reference / Caching and state / st.cache_data url: /develop/api-reference/caching-and-state/st.cache_data - description: isVersioned: true - category: Develop / API reference / Caching and state / st.cache_resource url: /develop/api-reference/caching-and-state/st.cache_resource - description: isVersioned: true - category: Develop / API reference / Caching and state / st.experimental_memo url: /develop/api-reference/caching-and-state/st.experimental_memo - description: isVersioned: true isDeprecated: true visible: false - category: Develop / API reference / Caching and state / st.experimental_singleton url: /develop/api-reference/caching-and-state/st.experimental_singleton - description: isVersioned: true isDeprecated: true visible: false - category: Develop / API reference / Caching and state / st.session_state url: /develop/api-reference/caching-and-state/st.session_state - description: - category: Develop / API reference / Caching and state / BROWSER - category: Develop / API reference / Caching and state / st.context url: /develop/api-reference/caching-and-state/st.context - description: isVersioned: true - category: Develop / API reference / Caching and state / st.query_params url: /develop/api-reference/caching-and-state/st.query_params - description: isVersioned: true - category: Develop / API reference / Caching and state / st.experimental_get_query_params url: /develop/api-reference/caching-and-state/st.experimental_get_query_params - description: isVersioned: true isDeprecated: true - category: Develop / API reference / Caching and state / st.experimental_set_query_params url: /develop/api-reference/caching-and-state/st.experimental_set_query_params - description: isVersioned: true isDeprecated: true - category: Develop / API reference / Connections and secrets url: /develop/api-reference/connections - description: - category: Develop / API reference / Connections and secrets / SECRETS - category: Develop / API reference / Connections and secrets / st.secrets url: /develop/api-reference/connections/st.secrets - description: - category: Develop / API reference / Connections and secrets / secrets.toml url: /develop/api-reference/connections/secrets.toml - description: - category: Develop / API reference / Connections and secrets / CONNECTIONS - category: Develop / API reference / Connections and secrets / st.connection url: /develop/api-reference/connections/st.connection - description: isVersioned: true - category: Develop / API reference / Connections and secrets / SnowflakeConnection url: /develop/api-reference/connections/st.connections.snowflakeconnection - description: isVersioned: true - category: Develop / API reference / Connections and secrets / SQLConnection url: /develop/api-reference/connections/st.connections.sqlconnection - description: isVersioned: true - category: Develop / API reference / Connections and secrets / BaseConnection url: /develop/api-reference/connections/st.connections.baseconnection - description: isVersioned: true - category: Develop / API reference / Connections and secrets / st.experimental_connection url: /develop/api-reference/connections/st.experimental_connection - description: isVersioned: true isDeprecated: true visible: false - category: Develop / API reference / Connections and secrets / SnowparkConnection url: /develop/api-reference/connections/st.connections.snowparkconnection - description: isVersioned: true isDeprecated: true - category: Develop / API reference / Connections and secrets / ExperimentalBaseConnection url: /develop/api-reference/connections/st.connections.experimentalbaseconnection - description: isVersioned: true isDeprecated: true visible: false - category: Develop / API reference / Custom components url: /develop/api-reference/custom-components - description: isVersioned: false - category: Develop / API reference / Custom components / st.components.v1​.declare_component url: /develop/api-reference/custom-components/st.components.v1.declare_component - description: isVersioned: true - category: Develop / API reference / Custom components / st.components.v1.html url: /develop/api-reference/custom-components/st.components.v1.html - description: isVersioned: true - category: Develop / API reference / Custom components / st.components.v1.iframe url: /develop/api-reference/custom-components/st.components.v1.iframe - description: isVersioned: true - category: Develop / API reference / Configuration url: /develop/api-reference/configuration - description: isVersioned: false - category: Develop / API reference / Configuration / config.toml url: /develop/api-reference/configuration/config.toml - description: - category: Develop / API reference / Configuration / st.get_option url: /develop/api-reference/configuration/st.get_option - description: isVersioned: true - category: Develop / API reference / Configuration / st.set_option url: /develop/api-reference/configuration/st.set_option - description: isVersioned: true - category: Develop / API reference / Configuration / st.set_page_config url: /develop/api-reference/configuration/st.set_page_config - description: isVersioned: true - category: Develop / API reference / TOOLS - category: Develop / API reference / App testing url: /develop/api-reference/app-testing - description: - category: Develop / API reference / App testing / st.testing.v1.AppTest url: /develop/api-reference/app-testing/st.testing.v1.apptest - description: isVersioned: true - category: Develop / API reference / App testing / Testing element classes url: /develop/api-reference/app-testing/testing-element-classes - description: isVersioned: true - category: Develop / API reference / Command line url: /develop/api-reference/cli - description: - category: Develop / API reference / Command line / streamlit cache url: /develop/api-reference/cli/cache - description: - category: Develop / API reference / Command line / streamlit config url: /develop/api-reference/cli/config - description: - category: Develop / API reference / Command line / streamlit docs url: /develop/api-reference/cli/docs - description: - category: Develop / API reference / Command line / streamlit hello url: /develop/api-reference/cli/hello - description: - category: Develop / API reference / Command line / streamlit help url: /develop/api-reference/cli/help - description: - category: Develop / API reference / Command line / streamlit init url: /develop/api-reference/cli/init - description: - category: Develop / API reference / Command line / streamlit run url: /develop/api-reference/cli/run - description: - category: Develop / API reference / Command line / streamlit version url: /develop/api-reference/cli/version - description: - category: Develop / Tutorials url: /develop/tutorials - description: - category: Develop / Tutorials / Authentication and personalization url: /develop/tutorials/authentication - description: - category: Develop / Tutorials / Authentication and personalization / Google Auth Platform url: /develop/tutorials/authentication/google - description: - category: Develop / Tutorials / Authentication and personalization / Microsoft Entra url: /develop/tutorials/authentication/microsoft - description: - category: Develop / Tutorials / Chat and LLM apps url: /develop/tutorials/chat-and-llm-apps - description: - category: Develop / Tutorials / Chat and LLM apps / Build a basic LLM chat app url: /develop/tutorials/chat-and-llm-apps/build-conversational-apps - description: - category: Develop / Tutorials / Chat and LLM apps / Build an LLM app using LangChain url: /develop/tutorials/chat-and-llm-apps/llm-quickstart - description: - category: Develop / Tutorials / Chat and LLM apps / Get chat response feedback url: /develop/tutorials/chat-and-llm-apps/chat-response-feedback - description: - category: Develop / Tutorials / Chat and LLM apps / Validate and edit chat responses url: /develop/tutorials/chat-and-llm-apps/validate-and-edit-chat-responses - description: - category: Develop / Tutorials / Configuration and theming url: /develop/tutorials/configuration-and-theming - description: - category: Develop / Tutorials / Configuration and theming / Use external font files url: /develop/tutorials/configuration-and-theming/external-fonts - description: - category: Develop / Tutorials / Configuration and theming / Use static font files url: /develop/tutorials/configuration-and-theming/static-fonts - description: - category: Develop / Tutorials / Configuration and theming / Use variable font files url: /develop/tutorials/configuration-and-theming/variable-fonts - description: - category: Develop / Tutorials / Connect to data sources url: /develop/tutorials/databases - description: - category: Develop / Tutorials / Connect to data sources / AWS S3 url: /develop/tutorials/databases/aws-s3 - description: - category: Develop / Tutorials / Connect to data sources / BigQuery url: /develop/tutorials/databases/bigquery - description: - category: Develop / Tutorials / Connect to data sources / Firestore url: https://blog.streamlit.io/streamlit-firestore/ - description: - category: Develop / Tutorials / Connect to data sources / Google Cloud Storage url: /develop/tutorials/databases/gcs - description: - category: Develop / Tutorials / Connect to data sources / Microsoft SQL Server url: /develop/tutorials/databases/mssql - description: - category: Develop / Tutorials / Connect to data sources / MongoDB url: /develop/tutorials/databases/mongodb - description: - category: Develop / Tutorials / Connect to data sources / MySQL url: /develop/tutorials/databases/mysql - description: - category: Develop / Tutorials / Connect to data sources / Neon url: /develop/tutorials/databases/neon - description: - category: Develop / Tutorials / Connect to data sources / PostgreSQL url: /develop/tutorials/databases/postgresql - description: - category: Develop / Tutorials / Connect to data sources / Private Google Sheet url: /develop/tutorials/databases/private-gsheet - description: - category: Develop / Tutorials / Connect to data sources / Public Google Sheet url: /develop/tutorials/databases/public-gsheet - description: - category: Develop / Tutorials / Connect to data sources / Snowflake url: /develop/tutorials/databases/snowflake - description: - category: Develop / Tutorials / Connect to data sources / Supabase url: /develop/tutorials/databases/supabase - description: - category: Develop / Tutorials / Connect to data sources / Tableau url: /develop/tutorials/databases/tableau - description: - category: Develop / Tutorials / Connect to data sources / TiDB url: /develop/tutorials/databases/tidb - description: - category: Develop / Tutorials / Connect to data sources / TigerGraph url: /develop/tutorials/databases/tigergraph - description: - category: Develop / Tutorials / Elements url: /develop/tutorials/elements - description: - category: Develop / Tutorials / Elements / CHARTS - category: Develop / Tutorials / Elements / Annotate an Altair chart url: /develop/tutorials/elements/annotate-an-altair-chart - description: - category: Develop / Tutorials / Elements / DATAFRAMES - category: Develop / Tutorials / Elements / Get dataframe row-selections url: /develop/tutorials/elements/dataframe-row-selections - description: - category: Develop / Tutorials / Elements / Get dataframe row-selections (streamlit<1.35.0) url: /develop/tutorials/elements/dataframe-row-selections-old - description: visible: false - category: Develop / Tutorials / Execution flow url: /develop/tutorials/execution-flow - description: - category: Develop / Tutorials / Execution flow / FRAGMENTS - category: Develop / Tutorials / Execution flow / Rerun your app from a fragment url: /develop/tutorials/execution-flow/trigger-a-full-script-rerun-from-a-fragment - description: - category: Develop / Tutorials / Execution flow / Create a multiple-container fragment url: /develop/tutorials/execution-flow/create-a-multiple-container-fragment - description: - category: Develop / Tutorials / Execution flow / Start and stop a streaming fragment url: /develop/tutorials/execution-flow/start-and-stop-fragment-auto-reruns - description: - category: Develop / Tutorials / Multipage apps url: /develop/tutorials/multipage - description: - category: Develop / Tutorials / Multipage apps / Dynamic navigation url: /develop/tutorials/multipage/dynamic-navigation - description: - category: Develop / Tutorials / Multipage apps / Build navigation with st.page_link url: /develop/tutorials/multipage/st.page_link-nav - description: visible: false - category: Develop / Quick reference url: /develop/quick-reference - description: - category: Develop / Quick reference / Cheat sheet url: /develop/quick-reference/cheat-sheet - description: - category: Develop / Quick reference / Release notes url: /develop/quick-reference/release-notes - description: - category: Develop / Quick reference / Release notes / 2025 url: /develop/quick-reference/release-notes/2025 - description: - category: Develop / Quick reference / Release notes / 2024 url: /develop/quick-reference/release-notes/2024 - description: - category: Develop / Quick reference / Release notes / 2023 url: /develop/quick-reference/release-notes/2023 - description: - category: Develop / Quick reference / Release notes / 2022 url: /develop/quick-reference/release-notes/2022 - description: - category: Develop / Quick reference / Release notes / 2021 url: /develop/quick-reference/release-notes/2021 - description: - category: Develop / Quick reference / Release notes / 2020 url: /develop/quick-reference/release-notes/2020 - description: - category: Develop / Quick reference / Release notes / 2019 url: /develop/quick-reference/release-notes/2019 - description: - category: Develop / Quick reference / Pre-release features url: /develop/quick-reference/prerelease - description: - category: Develop / Quick reference/ Roadmap url: https://roadmap.streamlit.app - description: - category: Deploy url: /deploy - description: color: lightBlue-70 icon: web_asset - category: Deploy / Concepts url: /deploy/concepts - description: - category: Deploy / Concepts / Dependencies url: /deploy/concepts/dependencies - description: - category: Deploy / Concepts / Secrets url: /deploy/concepts/secrets - description: - category: Deploy / Streamlit Community Cloud url: /deploy/streamlit-community-cloud - description: - category: Deploy / Streamlit Community Cloud / Get started url: /deploy/streamlit-community-cloud/get-started - description: - category: Deploy / Streamlit Community Cloud / Get started / Quickstart url: /deploy/streamlit-community-cloud/get-started/quickstart - description: - category: Deploy / Streamlit Community Cloud / Get started / Create your account url: /deploy/streamlit-community-cloud/get-started/create-your-account - description: - category: Deploy / Streamlit Community Cloud / Get started / Connect your GitHub account url: /deploy/streamlit-community-cloud/get-started/connect-your-github-account - description: - category: Deploy / Streamlit Community Cloud / Get started / Explore your workspace url: /deploy/streamlit-community-cloud/get-started/explore-your-workspace - description: - category: Deploy / Streamlit Community Cloud / Get started / Deploy from a template url: /deploy/streamlit-community-cloud/get-started/deploy-from-a-template - description: - category: Deploy / Streamlit Community Cloud / Get started / Fork and edit a public app url: /deploy/streamlit-community-cloud/get-started/fork-and-edit-a-public-app - description: - category: Deploy / Streamlit Community Cloud / Get started / Trust and security url: /deploy/streamlit-community-cloud/get-started/trust-and-security - description: - category: Deploy / Streamlit Community Cloud / Deploy your app url: /deploy/streamlit-community-cloud/deploy-your-app - description: - category: Deploy / Streamlit Community Cloud / Deploy your app / File organization url: /deploy/streamlit-community-cloud/deploy-your-app/file-organization - description: - category: Deploy / Streamlit Community Cloud / Deploy your app / App dependencies url: /deploy/streamlit-community-cloud/deploy-your-app/app-dependencies - description: - category: Deploy / Streamlit Community Cloud / Deploy your app / Secrets management url: /deploy/streamlit-community-cloud/deploy-your-app/secrets-management - description: - category: Deploy / Streamlit Community Cloud / Deploy your app / Deploy! url: /deploy/streamlit-community-cloud/deploy-your-app/deploy - description: - category: Deploy / Streamlit Community Cloud / Manage your app url: /deploy/streamlit-community-cloud/manage-your-app - description: - category: Deploy / Streamlit Community Cloud / Manage your app / App analytics url: /deploy/streamlit-community-cloud/manage-your-app/app-analytics - description: - category: Deploy / Streamlit Community Cloud / Manage your app / App settings url: /deploy/streamlit-community-cloud/manage-your-app/app-settings - description: - category: Deploy / Streamlit Community Cloud / Manage your app / Delete your app url: /deploy/streamlit-community-cloud/manage-your-app/delete-your-app - description: - category: Deploy / Streamlit Community Cloud / Manage your app / Edit your app url: /deploy/streamlit-community-cloud/manage-your-app/edit-your-app - description: - category: Deploy / Streamlit Community Cloud / Manage your app / Favorite your app url: /deploy/streamlit-community-cloud/manage-your-app/favorite-your-app - description: - category: Deploy / Streamlit Community Cloud / Manage your app / Reboot your app url: /deploy/streamlit-community-cloud/manage-your-app/reboot-your-app - description: - category: Deploy / Streamlit Community Cloud / Manage your app / Rename your app in GitHub url: /deploy/streamlit-community-cloud/manage-your-app/rename-your-app - description: - category: Deploy / Streamlit Community Cloud / Manage your app / Upgrade Python url: /deploy/streamlit-community-cloud/manage-your-app/upgrade-python - description: - category: Deploy / Streamlit Community Cloud / Manage your app / Upgrade Streamlit url: /deploy/streamlit-community-cloud/manage-your-app/upgrade-streamlit - description: - category: Deploy / Streamlit Community Cloud / Share your app url: /deploy/streamlit-community-cloud/share-your-app - description: - category: Deploy / Streamlit Community Cloud / Share your app / Embed your app url: /deploy/streamlit-community-cloud/share-your-app/embed-your-app - description: - category: Deploy / Streamlit Community Cloud / Share your app / Search indexability url: /deploy/streamlit-community-cloud/share-your-app/indexability - description: - category: Deploy / Streamlit Community Cloud / Share your app / Share previews url: /deploy/streamlit-community-cloud/share-your-app/share-previews - description: - category: Deploy / Streamlit Community Cloud / Manage your account url: /deploy/streamlit-community-cloud/manage-your-account - description: - category: Deploy / Streamlit Community Cloud / Manage your account / Sign in and sign out url: /deploy/streamlit-community-cloud/manage-your-account/sign-in-sign-out - description: - category: Deploy / Streamlit Community Cloud / Manage your account / Workspace settings url: /deploy/streamlit-community-cloud/manage-your-account/workspace-settings - description: - category: Deploy / Streamlit Community Cloud / Manage your account / Manage your GitHub connection url: /deploy/streamlit-community-cloud/manage-your-account/manage-your-github-connection - description: - category: Deploy / Streamlit Community Cloud / Manage your account / Update your email url: /deploy/streamlit-community-cloud/manage-your-account/update-your-email - description: - category: Deploy / Streamlit Community Cloud / Manage your account / Delete your account url: /deploy/streamlit-community-cloud/manage-your-account/delete-your-account - description: - category: Deploy / Streamlit Community Cloud / Status and limitations url: /deploy/streamlit-community-cloud/status - description: - category: Deploy / Snowflake url: /deploy/snowflake - description: - category: Deploy / Other platforms url: /deploy/tutorials - description: - category: Deploy / Other platforms / Docker url: /deploy/tutorials/docker - description: - category: Deploy / Other platforms / Kubernetes url: /deploy/tutorials/kubernetes - description: - category: Knowledge base url: /knowledge-base - description: color: darkBlue-70 icon: school - category: Knowledge base / FAQ url: /knowledge-base/using-streamlit - description: - category: Knowledge base / FAQ / How do I create an anchor link? url: /knowledge-base/using-streamlit/create-anchor-link - description: visible: false - category: Knowledge base / FAQ / Enabling camera access in your browser url: /knowledge-base/using-streamlit/enable-camera - description: visible: false - category: Knowledge base / FAQ / How to download a file in Streamlit? url: /knowledge-base/using-streamlit/how-download-file-streamlit - description: visible: false - category: Knowledge base / FAQ / How to download a Pandas DataFrame as a CSV? url: /knowledge-base/using-streamlit/how-download-pandas-dataframe-csv - description: visible: false - category: Knowledge base / FAQ / How do I upgrade to the latest version of Streamlit? url: /knowledge-base/using-streamlit/how-upgrade-latest-version-streamlit - description: visible: false - category: Knowledge base / FAQ / How to insert elements out of order? url: /knowledge-base/using-streamlit/insert-elements-out-of-order - description: visible: false - category: Knowledge base / FAQ / How can I make st.pydeck_chart use custom Mapbox styles? url: /knowledge-base/using-streamlit/pydeck-chart-custom-mapbox-styles - description: visible: false - category: Knowledge base / FAQ / How to remove "· Streamlit" from the app title? url: /knowledge-base/using-streamlit/remove-streamlit-app-title - description: visible: false - category: Knowledge base / FAQ / How do you retrieve the filename of a file uploaded with st.file_uploader? url: /knowledge-base/using-streamlit/retrieve-filename-uploaded - description: visible: false - category: Knowledge base / FAQ / Sanity checks url: /knowledge-base/using-streamlit/sanity-checks - description: visible: false - category: Knowledge base / FAQ / How can I make Streamlit watch for changes in other modules I'm importing in my app? url: /knowledge-base/using-streamlit/streamlit-watch-changes-other-modules-importing-app - description: visible: false - category: Knowledge base / FAQ / What browsers does Streamlit support? url: /knowledge-base/using-streamlit/supported-browsers - description: visible: false - category: Knowledge base / FAQ / Where does st.file_uploader store uploaded files and when do they get deleted? url: /knowledge-base/using-streamlit/where-file-uploader-store-when-deleted - description: visible: false - category: Knowledge base / FAQ / Widget updating for every second input when using session state url: /knowledge-base/using-streamlit/widget-updating-session-state - description: visible: false - category: Knowledge base / FAQ / Why does Streamlit restrict nested st.columns? url: /knowledge-base/using-streamlit/why-streamlit-restrict-nested-columns - description: visible: false - category: Knowledge base / FAQ / What is serializable session state? url: /knowledge-base/using-streamlit/serializable-session-state - description: visible: false - category: Knowledge base / Installing dependencies url: /knowledge-base/dependencies - description: - category: Knowledge base / Installing dependencies / How to install a package not on PyPI or Conda but available on GitHub url: /knowledge-base/dependencies/install-package-not-pypi-conda-available-github - description: visible: false - category: Knowledge base / Installing dependencies / ImportError libGL.so.1 cannot open shared object file No such file or directory url: /knowledge-base/dependencies/libgl - description: visible: false - category: Knowledge base / Installing dependencies / ModuleNotFoundError No module named url: /knowledge-base/dependencies/module-not-found-error - description: visible: false - category: Knowledge base / Installing dependencies / ERROR No matching distribution found for url: /knowledge-base/dependencies/no-matching-distribution - description: visible: false - category: Knowledge base / Deployment issues url: /knowledge-base/deploy - description: - category: Knowledge base / Deployment issues / How can I deploy multiple Streamlit apps on different subdomains? url: /knowledge-base/deploy/deploy-multiple-streamlit-apps-different-subdomains - description: visible: false - category: Knowledge base / Deployment issues / How do I deploy Streamlit on a domain so it appears to run on a regular port (i.e. port 80)? url: /knowledge-base/deploy/deploy-streamlit-domain-port-80 - description: visible: false - category: Knowledge base / Deployment issues / Does Streamlit support the WSGI Protocol? (aka Can I deploy Streamlit with gunicorn?) url: /knowledge-base/deploy/does-streamlit-support-wsgi-protocol - description: visible: false - category: Knowledge base / Deployment issues / How do I increase the upload limit of st.file_uploader on Streamlit Community Cloud? url: /knowledge-base/deploy/increase-file-uploader-limit-streamlit-cloud - description: visible: false - category: Knowledge base / Deployment issues / Invoking a Python subprocess in a deployed Streamlit app url: /knowledge-base/deploy/invoking-python-subprocess-deployed-streamlit-app - description: visible: false - category: Knowledge base / Deployment issues / App is not loading when running remotely url: /knowledge-base/deploy/remote-start - description: visible: false - category: Knowledge base / Deployment issues / Argh. This app has gone over its resource limits url: /knowledge-base/deploy/resource-limits - description: visible: false - category: Knowledge base / Deployment issues / How do I share apps with viewers outside my organization? url: /knowledge-base/deploy/share-apps-with-viewers-outside-organization - description: visible: false - category: Knowledge base / Deployment issues / Upgrade the Streamlit version of your app on Streamlit Community Cloud url: /knowledge-base/deploy/upgrade-streamlit-version-on-streamlit-cloud - description: visible: false - category: Knowledge base / Deployment issues / Huh. This is isn't supposed to happen message after trying to log in url: /knowledge-base/deploy/huh-this-isnt-supposed-to-happen-message-after-trying-to-log-in - description: visible: false - category: Knowledge base / Deployment issues / Login attempt to Streamlit Community Cloud fails with error 403 url: /knowledge-base/deploy/login-attempt-to-streamlit-community-cloud-fails-with-error-403 - description: visible: false - category: Knowledge base / Deployment issues / How to submit a support case for Streamlit Community Cloud url: /knowledge-base/deploy/how-to-submit-a-support-case-for-streamlit-community-cloud - description: visible: false --- diff --git a/python/generate_llms_full_txt.py b/python/generate_llms_full_txt.py index 2cc7a64b2..080db7e16 100644 --- a/python/generate_llms_full_txt.py +++ b/python/generate_llms_full_txt.py @@ -280,8 +280,7 @@ def replace_autofunction_tags(content: str, function_info: Dict[str, Any]) -> st else: if function_name: print( - f"Warning: Function '{function_name}' not found in " - "streamlit.json" + f"Warning: Function '{function_name}' not found in streamlit.json" ) # If function not found, remove the tag but leave a placeholder tag.replace_with(f"[Function '{function_name}' not found]") @@ -303,7 +302,7 @@ def process_markdown_files(content_dir: Path) -> List[Dict[str, Optional[str]]]: content_dir: Path to the content directory containing markdown files. Returns: - List of dictionaries containing 'url' (from frontmatter slug) and 'content' + List of dictionaries containing 'url' (from frontmatter slug) and 'content' for each markdown file. """ content_catalog: List[Dict[str, Optional[str]]] = [] @@ -398,4 +397,3 @@ def main() -> None: if __name__ == "__main__": main() - diff --git a/python/generate_llms_txt.py b/python/generate_llms_txt.py index 7cde8974a..05a65e681 100644 --- a/python/generate_llms_txt.py +++ b/python/generate_llms_txt.py @@ -10,7 +10,7 @@ # Usage: # uv run generate_llms_txt.py -from typing import Dict, Any +from typing import Dict, Any, Optional import frontmatter from pathlib import Path @@ -34,10 +34,34 @@ def read_menu_file(menu_file_path: Path) -> Dict: return post.metadata.get("site_menu", {}) +def get_url_to_descriptions_dict(content_dir: Path) -> Dict[str, Optional[str]]: + url_to_descriptions_dict = {} + + # Walk through all directories and files + for file_path in content_dir.rglob("*.md"): + try: + # Read the content of the markdown file with frontmatter + post = frontmatter.load(file_path) + + # Get the URL from frontmatter slug if it exists, otherwise set to null + url = post.get("slug") + + if not url: + continue + + url_to_descriptions_dict[url] = post.get("description") + + except frontmatter.FrontmatterError as e: + print(f"Error parsing frontmatter in {file_path}: {str(e)}") + except Exception as e: + print(f"Error processing {file_path}: {str(e)}") + + return url_to_descriptions_dict + + def main() -> None: # Get the content directory path (sibling to the python directory) content_dir = Path(__file__).parent.parent / "content" - menu_file_path = content_dir / "menu.md" try: @@ -46,6 +70,8 @@ def main() -> None: print("Error reading menu file\n") raise e + url_to_descriptions_dict = get_url_to_descriptions_dict(content_dir) + output = [INITIAL_TEXT] prev_output_is_paragraph = True @@ -65,7 +91,10 @@ def main() -> None: category_list = menu_item["category"].split(CATEGORY_SEP) url = menu_item["url"] - description = menu_item.get("description", "") + description = url_to_descriptions_dict.get(url, None) + + if not description: + description = menu_item.get("description", None) # This assumes menu.md is in order. category_label = category_list[-1] From 7e37789b13f70913952450197dc99819a81c72a0 Mon Sep 17 00:00:00 2001 From: Thiago Teixeira Date: Tue, 16 Sep 2025 07:52:51 -0300 Subject: [PATCH 3/4] Improve typing. --- python/generate_llms_txt.py | 41 +++++++++++++++++++++++++------------ 1 file changed, 28 insertions(+), 13 deletions(-) diff --git a/python/generate_llms_txt.py b/python/generate_llms_txt.py index 05a65e681..fe5013878 100644 --- a/python/generate_llms_txt.py +++ b/python/generate_llms_txt.py @@ -10,7 +10,7 @@ # Usage: # uv run generate_llms_txt.py -from typing import Dict, Any, Optional +from typing import Dict, Any, Optional, cast import frontmatter from pathlib import Path @@ -24,35 +24,48 @@ with only a few lines of code.""" -def read_menu_file(menu_file_path: Path) -> Dict: +def read_menu_file(menu_file_path: Path) -> Dict[str, Any]: + """Read and parse the menu file containing the documentation structure. + + Args: + menu_file_path: Path to the menu.md file + + Returns: + List of dictionaries containing menu items and their metadata + """ # Read the menu.md file with open(menu_file_path, "r", encoding="utf-8") as f: content = f.read() # Parse the frontmatter post = frontmatter.loads(content) - return post.metadata.get("site_menu", {}) + return cast(Dict[str, Any], post.metadata.get("site_menu", {})) def get_url_to_descriptions_dict(content_dir: Path) -> Dict[str, Optional[str]]: - url_to_descriptions_dict = {} + """Get a mapping of URLs to their descriptions from markdown files. + + Args: + content_dir: Directory containing markdown files to process + + Returns: + Dictionary mapping URLs to their descriptions (None if no description) + """ + url_to_descriptions_dict: Dict[str, Optional[str]] = {} # Walk through all directories and files for file_path in content_dir.rglob("*.md"): try: # Read the content of the markdown file with frontmatter - post = frontmatter.load(file_path) + post = frontmatter.load(str(file_path)) - # Get the URL from frontmatter slug if it exists, otherwise set to null - url = post.get("slug") + url = cast(Optional[str], post.get("slug")) if not url: continue - url_to_descriptions_dict[url] = post.get("description") + url_to_descriptions_dict[url] = cast(Optional[str], post.get("description")) - except frontmatter.FrontmatterError as e: - print(f"Error parsing frontmatter in {file_path}: {str(e)}") except Exception as e: print(f"Error processing {file_path}: {str(e)}") @@ -60,6 +73,7 @@ def get_url_to_descriptions_dict(content_dir: Path) -> Dict[str, Optional[str]]: def main() -> None: + """Generate the llms.txt file from the documentation structure.""" # Get the content directory path (sibling to the python directory) content_dir = Path(__file__).parent.parent / "content" menu_file_path = content_dir / "menu.md" @@ -76,6 +90,7 @@ def main() -> None: prev_output_is_paragraph = True for menu_item in menu_dict: + menu_item = cast(Dict, menu_item) try: if "visible_to_llms" in menu_item: if not menu_item["visible_to_llms"]: @@ -89,15 +104,15 @@ def main() -> None: continue category_list = menu_item["category"].split(CATEGORY_SEP) - url = menu_item["url"] + url: str = menu_item["url"] - description = url_to_descriptions_dict.get(url, None) + description: Optional[str] = url_to_descriptions_dict.get(url, None) if not description: description = menu_item.get("description", None) # This assumes menu.md is in order. - category_label = category_list[-1] + category_label: str = category_list[-1] indentation = "" From 6702ec682b7f757732eec3cae175ab2f13aacff4 Mon Sep 17 00:00:00 2001 From: Debbie Matthews Date: Thu, 18 Sep 2025 20:28:47 -0700 Subject: [PATCH 4/4] Add comments, reformat header lines --- .../installation/streamlit-playground.md | 1 + content/kb/FAQ/_index.md | 1 + content/kb/_index.md | 1 + content/kb/dependencies/_index.md | 1 + content/kb/deployments/_index.md | 1 + python/generate_llms_txt.py | 61 +++++++++++++++---- 6 files changed, 53 insertions(+), 13 deletions(-) diff --git a/content/get-started/installation/streamlit-playground.md b/content/get-started/installation/streamlit-playground.md index f0fbf8d87..260098328 100644 --- a/content/get-started/installation/streamlit-playground.md +++ b/content/get-started/installation/streamlit-playground.md @@ -1,6 +1,7 @@ --- title: Use Streamlit Playground in your browser slug: /get-started/installation/streamlit-playground +description: Quick start guide to Streamlit using the Streamlit Playground - no installation required. --- # Use Streamlit Playground in your browser diff --git a/content/kb/FAQ/_index.md b/content/kb/FAQ/_index.md index 2883462f5..7e70108b3 100644 --- a/content/kb/FAQ/_index.md +++ b/content/kb/FAQ/_index.md @@ -1,6 +1,7 @@ --- title: FAQ slug: /knowledge-base/using-streamlit +description: Explore answers to frequently asked questions about developing a Streamlit app. --- # FAQ diff --git a/content/kb/_index.md b/content/kb/_index.md index 822337496..ff7106083 100644 --- a/content/kb/_index.md +++ b/content/kb/_index.md @@ -1,6 +1,7 @@ --- title: Knowledge Base slug: /knowledge-base +description: Explore troubleshooting guides for common problems. --- # Knowledge base diff --git a/content/kb/dependencies/_index.md b/content/kb/dependencies/_index.md index 9ed119344..638b2f50c 100644 --- a/content/kb/dependencies/_index.md +++ b/content/kb/dependencies/_index.md @@ -1,6 +1,7 @@ --- title: Installing dependencies slug: /knowledge-base/dependencies +description: Explore common dependency and environment problems, and see possible solutions. --- # Installing dependencies diff --git a/content/kb/deployments/_index.md b/content/kb/deployments/_index.md index 208f3b8c3..f00396cc4 100644 --- a/content/kb/deployments/_index.md +++ b/content/kb/deployments/_index.md @@ -1,6 +1,7 @@ --- title: Deployment Issues slug: /knowledge-base/deploy +description: Explore common deployment problems and solutions. --- # Deployment-related questions and errors diff --git a/python/generate_llms_txt.py b/python/generate_llms_txt.py index fe5013878..c5f9644e6 100644 --- a/python/generate_llms_txt.py +++ b/python/generate_llms_txt.py @@ -7,6 +7,10 @@ # This file is used to generate llms.txt, which describes the structure # of Streamlit's documentation, with links for more info. # +# The llms.txt file is a standardized format for describing a project's +# structure for Language Learning Models (LLMs), making it easier for +# AI assistants to understand and navigate the documentation. +# # Usage: # uv run generate_llms_txt.py @@ -14,8 +18,11 @@ import frontmatter from pathlib import Path +# Separator used in menu categories to create hierarchical navigation +# e.g., "Get started / Installation" becomes ["Get started", "Installation"] CATEGORY_SEP = " / " +# Header text that appears at the top of the generated llms.txt file INITIAL_TEXT = """\ # Streamlit documentation website @@ -31,7 +38,7 @@ def read_menu_file(menu_file_path: Path) -> Dict[str, Any]: menu_file_path: Path to the menu.md file Returns: - List of dictionaries containing menu items and their metadata + Dictionary containing the parsed menu structure from the frontmatter """ # Read the menu.md file with open(menu_file_path, "r", encoding="utf-8") as f: @@ -73,8 +80,16 @@ def get_url_to_descriptions_dict(content_dir: Path) -> Dict[str, Optional[str]]: def main() -> None: - """Generate the llms.txt file from the documentation structure.""" - # Get the content directory path (sibling to the python directory) + """Generate the llms.txt file from the documentation structure. + + This is the main function that orchestrates the entire process: + 1. Reads the menu structure from menu.md + 2. Extracts descriptions from individual markdown files + 3. Processes menu items to create a hierarchical structure + 4. Generates the final llms.txt file with proper formatting + """ + # Construct paths relative to this script's location + # The content directory is a sibling to the python directory content_dir = Path(__file__).parent.parent / "content" menu_file_path = content_dir / "menu.md" @@ -89,69 +104,89 @@ def main() -> None: output = [INITIAL_TEXT] prev_output_is_paragraph = True + # Process each menu item from the parsed menu structure for menu_item in menu_dict: menu_item = cast(Dict, menu_item) try: + # Check visibility settings for LLMs + # Some pages may be hidden from LLMs specifically using 'visible_to_llms' if "visible_to_llms" in menu_item: if not menu_item["visible_to_llms"]: continue else: + # Fall back to general 'visible' flag if 'visible_to_llms' not specified if not menu_item.get("visible", True): continue + + # Skip items without required fields if "category" not in menu_item: continue if "url" not in menu_item: continue + # Parse the hierarchical category structure + # e.g., "Get started / Installation / Command line" -> ["Get started", "Installation", "Command line"] category_list = menu_item["category"].split(CATEGORY_SEP) url: str = menu_item["url"] + # Try to get description from the markdown files first (more detailed) + # Fall back to description in menu if not found description: Optional[str] = url_to_descriptions_dict.get(url, None) - if not description: description = menu_item.get("description", None) - # This assumes menu.md is in order. + # The label to display is the last part of the category hierarchy + # This assumes menu.md is ordered hierarchically category_label: str = category_list[-1] + # Format output based on the hierarchy level indentation = "" + # Level 1: Top-level sections (## headers) + # e.g., "Get started", "Develop", "Deploy" if len(category_list) == 1: - output.append("") - output.append(f"## {category_label}") - output.append(f"({url})") + output.append("") # Add blank line for separation + output.append(f"## [{category_label}]({url})") if description: output.append("") output.append(description) prev_output_is_paragraph = True + # Level 2: Subsections (### headers) + # e.g., "Installation", "Fundamentals", "First steps" elif len(category_list) == 2: - output.append("") - output.append(f"### {category_label}") - output.append(f"({url})") + output.append("") # Add blank line for separation + output.append(f"### [{category_label}]({url})") if description: output.append("") output.append(description) prev_output_is_paragraph = True + # Level 3+: List items with proper indentation + # e.g., individual tutorial pages, API references else: if prev_output_is_paragraph: output.append("") + # Calculate indentation: each level beyond 3 gets 2 spaces num_indents = len(category_list) - 3 indentation = num_indents * " " + + # Format as markdown list item with link output.append(f"{indentation}- [{category_label}]({url})") if description: output.append(f"{indentation} {description}") prev_output_is_paragraph = False + except Exception as e: print(f"--------------------\nError parsing {menu_item['category']}\n") raise e - # Write all content to a single markdown file + # Generate the final output file + # The llms.txt file is placed in the public directory for web serving output_file = Path(__file__).parent.parent / "public" / "llms.txt" - # Write to file + # Join all output lines with newlines and write to file output_file.write_text("\n".join(output), encoding="utf-8") print(f"Successfully generated {output_file}")