diff --git a/README.md b/README.md index 5a00fdfc3..23e7727a3 100644 --- a/README.md +++ b/README.md @@ -149,7 +149,7 @@ Do you want to add a new page to the docs? 1. First, decide which section the page should live in (Streamlit Library, Streamlit Community Cloud, or Knowledge Base). -2. Next, navigate to the relevant folder and subfolder within `content/` and create a `.md` file whose filename mirrors the title of the page. E.g. For a page titled "Create a component", navigate to `content/library/components/` and create a file named `create-component.md`. +2. Next, navigate to the relevant folder and subfolder within `content/` and create a `.md` file whose filename mirrors the title of the page. E.g. For a page titled "Create a component", navigate to `content/develop/concepts/custom-components/` and create a file named `create-component.md`. ### Structure of the `.md` file @@ -159,12 +159,12 @@ Now that you've decided where the file should live and have named the file, it's Every `.md` file has front matter at the very top that defines the page title which appears in the browser tab bar, and the URL slug which appears after the slash in `docs.streamlit.io/` and `localhost:3000/`. -E.g. For a page titled "Create a component" that should exist at `docs.streamlit.io/library/components/create`, the front matter at the top of `create-component.md` is: +E.g. For a page titled "Create a component" that should exist at `docs.streamlit.io/develop/concepts/custom-components/create`, the front matter at the top of `create-component.md` is: ```markdown --- title: Create a Component -slug: /library/components/create +slug: /develop/concepts/custom-components/create --- ``` @@ -272,19 +272,19 @@ If you need to regenerate all function signatures, across all versions, delete t Suppose a new Streamlit release includes a `st.my_chart` function that you want to include in the "Chart elements" section of the API Reference: 1. Run `make docstrings` -2. Create Markdown file (`my_chart.md`) in `content/library/api/charts/` +2. Create Markdown file (`my_chart.md`) in `content/develop/api/charts/` 3. Add the following to `my_chart.md`: ```markdown --- title: st.my_chart - slug: /library/api-reference/charts/st.my_chart + slug: /develop/api-reference/charts/st.my_chart --- ``` -4. Add the following under the "Chart elements" heading in `content/library/api/api-reference.md`: +4. Add the following under the "Chart elements" heading in `content/develop/api/api-reference.md`: 1. A RefCard MDX function containing the URL slug defined in `my_chart.md` . This is the card that will appear on the API Reference landing page. 2. An Image MDX function containing alt text and the location of the image to be displayed on the card. 3. A bold heading that will appear on the card (`#### Heading`). It appears below the card image. @@ -292,7 +292,7 @@ Suppose a new Streamlit release includes a `st.my_chart` function that you want 5. A code block illustrating how to use `st.my_chart`. It appears below the card description and has a Copy icon that when clicked copies the code block to the users' clipboard. ````markdown - + Tux, the Linux mascot #### My charts @@ -310,7 +310,7 @@ Suppose a new Streamlit release includes a `st.my_chart` function that you want ```YAML - category: Streamlit Library / API Reference / Chart elements / st.my_chart - url: /library/api-reference/charts/st.my_chart + url: /develop/api-reference/charts/st.my_chart ``` 6. Save your changes and refresh the browser tab. If all went well, you should see a new entry in the Menu, a new card in the API Reference, and a new page for `st.my_chart`. diff --git a/components/navigation/navItem.js b/components/navigation/navItem.js index 119216a6f..91526e1b4 100644 --- a/components/navigation/navItem.js +++ b/components/navigation/navItem.js @@ -73,15 +73,9 @@ const NavItem = ({ page, slug, condensed, className }) => { if (page.url.startsWith("/")) { navItem = (
  • - {page.url === "/library" ? ( - - {navBox} - - ) : ( - - {navBox} - - )} + + {navBox} + {subNav}
  • ); diff --git a/components/summaryTiles.js b/components/summaryTiles.js index c09598c41..4b9633d8f 100644 --- a/components/summaryTiles.js +++ b/components/summaryTiles.js @@ -17,7 +17,7 @@ const SummaryTiles = () => { title="API reference" text="Learn about our APIs, with actionable explanations of specific functions and features." background="indigo-70" - link="/library/api-reference" + link="/develop/api-reference" /> + Understand the basics of app deployment. + Deploy your app on our free platform and join a community of developers who share their apps around the world. + Deploy your app in Snowflake for a secure, enterprise-grade environment. + Learn how to deploy your app on a variety of platforms with our convenient collection of tutorials. + diff --git a/content/streamlit-cloud/index.md b/content/deploy/community-cloud/_index.md similarity index 65% rename from content/streamlit-cloud/index.md rename to content/deploy/community-cloud/_index.md index d0ca86baa..b7f4d34b6 100644 --- a/content/streamlit-cloud/index.md +++ b/content/deploy/community-cloud/_index.md @@ -1,51 +1,45 @@ --- title: Streamlit Community Cloud -slug: /streamlit-community-cloud +slug: /deploy/streamlit-community-cloud --- # Welcome to Streamlit Community Cloud Deploy, manage, and share your Streamlit apps with the world in minutes — all for free. Your Streamlit Community Cloud account connects directly to your GitHub repository (public or private). Most apps will launch in only a few minutes. Streamlit Community Cloud handles all of the containerization so all you need to worry about is creating the app. Rapidly prototype, explore, and update apps by simply changing your code in GitHub. Most changes appear immediately! -Want to avoid the work of setting up a local development environment? Community Cloud can help you quickly configure a codespace to develop in the cloud. Whether it's your own deployed app or an app deployed from a public repository, it only takes a few clicks to start coding or editing a Streamlit app. See [Edit your app](/streamlit-community-cloud/manage-your-app/edit-your-app). +Want to avoid the work of setting up a local development environment? Community Cloud can help you quickly configure a codespace to develop in the cloud. Whether it's your own deployed app or an app deployed from a public repository, it only takes a few clicks to start coding or editing a Streamlit app. See [Edit your app](/deploy/streamlit-community-cloud/manage-your-app/edit-your-app). -If you haven't built your first Streamlit app yet, you can check out [Get started](/get-started) in our Streamlit library documentation or [Fork and edit a public app](/streamlit-community-cloud/get-started/fork-and-edit-a-public-app) from our App gallery. Check out [Community Cloud quickstart](/streamlit-community-cloud/get-started) to speed-run you through creating your account, deploying an example app, and editing it using GitHub Codespaces. +If you haven't built your first Streamlit app yet, you can check out [Get started](/get-started) in our Streamlit library documentation or [Fork and edit a public app](/deploy/streamlit-community-cloud/get-started/fork-and-edit-a-public-app) from our App gallery. Check out [Community Cloud quickstart](/deploy/streamlit-community-cloud/get-started) to speed-run you through creating your account, deploying an example app, and editing it using GitHub Codespaces. - Create your account and deploy an example app as fast as possible. Jump right into coding with GitHub Codespaces. Learn about Streamlit Community Cloud accounts and how to create one. A step-by-step guide on how to get your app deployed. - Share or embed your app. Access logs, reboot apps, set favorites, and more. Jump into a GitHub Codespace to edit your app in the cloud. + Share or embed your app. Update your email, manage connections, or delete your account. diff --git a/content/streamlit-cloud/deploy-your-app/index.md b/content/deploy/community-cloud/deploy-your-app/_index.md similarity index 83% rename from content/streamlit-cloud/deploy-your-app/index.md rename to content/deploy/community-cloud/deploy-your-app/_index.md index 1e0b22758..1752c7a3c 100644 --- a/content/streamlit-cloud/deploy-your-app/index.md +++ b/content/deploy/community-cloud/deploy-your-app/_index.md @@ -1,21 +1,21 @@ --- title: Deploy your app -slug: /streamlit-community-cloud/deploy-your-app +slug: /deploy/streamlit-community-cloud/deploy-your-app --- # Deploy your app -Streamlit Community Cloud lets you deploy your apps in just one click, and most apps will deploy in only a few minutes. If you don't have an app ready to deploy, fork or clone one from our App gallery — you can find apps for machine learning, data visualization, data exploration, A/B testing and more. You can also fork and deploy samples straight from the [New app button](/streamlit-community-cloud/get-started/explore-your-workspace#new-app-button). Once you've deployed your app, check out how you can [Edit your app with GitHub Codespaces](/streamlit-community-cloud/manage-your-app/edit-your-app#edit-your-app-with-github-codespaces). +Streamlit Community Cloud lets you deploy your apps in just one click, and most apps will deploy in only a few minutes. If you don't have an app ready to deploy, fork or clone one from our App gallery — you can find apps for machine learning, data visualization, data exploration, A/B testing and more. You can also fork and deploy samples straight from the [New app button](/deploy/streamlit-community-cloud/get-started/explore-your-workspace#new-app-button). Once you've deployed your app, check out how you can [Edit your app with GitHub Codespaces](/deploy/streamlit-community-cloud/manage-your-app/edit-your-app#edit-your-app-with-github-codespaces). -If you want to deploy your app on a different cloud service, check out the [Deploy Streamlit apps](/knowledge-base/tutorials/deploy) article in our Knowledge Base. +If you want to deploy your app on a different cloud service, check out the [Deploy Streamlit apps](/deploy/tutorials) article in our Knowledge Base. ## Add your app to GitHub -Streamlit Community Cloud launches apps directly from your GitHub repo, so your app code and dependencies need to be on GitHub before you try to deploy your app. For more information on how to specify dependencies, see [App dependencies](/streamlit-community-cloud/deploy-your-app/app-dependencies). +Streamlit Community Cloud launches apps directly from your GitHub repo, so your app code and dependencies need to be on GitHub before you try to deploy your app. For more information on how to specify dependencies, see [App dependencies](/deploy/streamlit-community-cloud/deploy-your-app/app-dependencies). Your directory structure should look similar to this: @@ -25,7 +25,7 @@ your-repository/ └── requirements.txt ``` -If you are including any custom [Configuration](/library/advanced-features/configuration) or [Theming](/library/advanced-features/theming), make sure your config file is saved relative to the root of your repo. Within your repo, your config file should be named `.streamlit/config.toml`. +If you are including any custom [Configuration](/develop/concepts/configuration) or [Theming](/develop/concepts/configuration/theming), make sure your config file is saved relative to the root of your repo. Within your repo, your config file should be named `.streamlit/config.toml`. ``` your-repository/ @@ -61,7 +61,7 @@ Streamlit Community Cloud supports all released [versions of Python that are sti -3. (Optional) If you are connecting to a data source or want to specify the Python version for your app, you can do that by clicking "**Advanced settings**" before you deploy the app. Learn more about [Secrets management](/streamlit-community-cloud/deploy-your-app/secrets-management). +3. (Optional) If you are connecting to a data source or want to specify the Python version for your app, you can do that by clicking "**Advanced settings**" before you deploy the app. Learn more about [Secrets management](/deploy/streamlit-community-cloud/deploy-your-app/secrets-management). ![Advanced settings for deploying your app](/images/streamlit-community-cloud/deploy-an-app-advanced.png) @@ -73,13 +73,13 @@ Your app is now deploying and you can watch while it launches. Most apps take on -The Streamlit Community Cloud logs on the right hand side of your app are only viewable to users with developer access to your repository. These logs help you debug any issues with the app. Learn more about [Streamlit Community Cloud logs](/streamlit-community-cloud/manage-your-app#streamlit-community-cloud-logs). +The Streamlit Community Cloud logs on the right hand side of your app are only viewable to users with developer access to your repository. These logs help you debug any issues with the app. Learn more about [Streamlit Community Cloud logs](/deploy/streamlit-community-cloud/manage-your-app#streamlit-community-cloud-logs). ## Your app URL -That's it — you're done! Your app now has a unique subdomain URL that you can share with others. Read more about how to [Share your app](/streamlit-community-cloud/share-your-app) with viewers. +That's it — you're done! Your app now has a unique subdomain URL that you can share with others. Read more about how to [Share your app](/deploy/streamlit-community-cloud/share-your-app) with viewers. ### Unique subdomains diff --git a/content/streamlit-cloud/deploy-your-app/app-dependencies.md b/content/deploy/community-cloud/deploy-your-app/app-dependencies.md similarity index 98% rename from content/streamlit-cloud/deploy-your-app/app-dependencies.md rename to content/deploy/community-cloud/deploy-your-app/app-dependencies.md index 4699161fa..b9a865df8 100644 --- a/content/streamlit-cloud/deploy-your-app/app-dependencies.md +++ b/content/deploy/community-cloud/deploy-your-app/app-dependencies.md @@ -1,6 +1,6 @@ --- title: App dependencies -slug: /streamlit-community-cloud/deploy-your-app/app-dependencies +slug: /deploy/streamlit-community-cloud/deploy-your-app/app-dependencies --- # App dependencies diff --git a/content/streamlit-cloud/deploy-your-app/secrets-management.md b/content/deploy/community-cloud/deploy-your-app/secrets-management.md similarity index 85% rename from content/streamlit-cloud/deploy-your-app/secrets-management.md rename to content/deploy/community-cloud/deploy-your-app/secrets-management.md index fc85fd7fa..c6e6398a1 100644 --- a/content/streamlit-cloud/deploy-your-app/secrets-management.md +++ b/content/deploy/community-cloud/deploy-your-app/secrets-management.md @@ -1,13 +1,13 @@ --- title: Secrets management -slug: /streamlit-community-cloud/deploy-your-app/secrets-management +slug: /deploy/streamlit-community-cloud/deploy-your-app/secrets-management --- # Secrets management ## Introduction -If you are [connecting to data sources](/knowledge-base/tutorials/databases), you will likely need to handle credentials or secrets. It's generally considered bad practice to store unencrypted secrets in a git repository. If your application needs access to sensitive credentials the recommended solution is to store those credentials in a file that is not committed to the repository and to pass them as environment variables. +If you are [connecting to data sources](/develop/tutorials/databases), you will likely need to handle credentials or secrets. It's generally considered bad practice to store unencrypted secrets in a git repository. If your application needs access to sensitive credentials the recommended solution is to store those credentials in a file that is not committed to the repository and to pass them as environment variables. Secrets management allows you to store secrets securely and access them in your Streamlit app as environment variables. @@ -61,7 +61,7 @@ st.write( -You can access `st.secrets` via attribute notation (e.g. `st.secrets.key`) or key notation (e.g. `st.secrets["key"]`) — just like [`st.session_state`](/library/api-reference/session-state). +You can access `st.secrets` via attribute notation (e.g. `st.secrets.key`) or key notation (e.g. `st.secrets["key"]`) — just like [`st.session_state`](/develop/api-reference/caching-and-state/st.session_state). @@ -99,7 +99,7 @@ If you need to add or edit your secrets for an app that is already deployed, you ### Develop locally with secrets -When developing your app locally, add a file called `secrets.toml` in a folder called `.streamlit` at the root of your app repo, and copy/paste your secrets into that file. Further instructions are available in the Streamlit library [Secrets management](/library/advanced-features/secrets-management) documentation. +When developing your app locally, add a file called `secrets.toml` in a folder called `.streamlit` at the root of your app repo, and copy/paste your secrets into that file. Further instructions are available in the Streamlit library [Secrets management](/develop/concepts/connections/secrets-management) documentation. diff --git a/content/streamlit-cloud/get-started/index.md b/content/deploy/community-cloud/get-started/_index.md similarity index 83% rename from content/streamlit-cloud/get-started/index.md rename to content/deploy/community-cloud/get-started/_index.md index 5654c5453..b4fb6c595 100644 --- a/content/streamlit-cloud/get-started/index.md +++ b/content/deploy/community-cloud/get-started/_index.md @@ -1,9 +1,9 @@ --- -title: Get started -slug: /streamlit-community-cloud/get-started +title: Get started with Streamlit Community Cloud +slug: /deploy/streamlit-community-cloud/get-started --- -# Get started +# Get started with Streamlit Community Cloud Welcome to Streamlit Community Cloud, where you can share your Streamlit apps with the world! Whether you've already created your first Streamlit app or you're just getting started, you're in the right place. @@ -14,14 +14,14 @@ First things first, you need to create your Streamlit Community Cloud account to icon="rocket_launch" title="Quickstart" text="Create your account and deploy an example app as fast as possible. Jump right into coding with GitHub Codespaces." - link="/streamlit-community-cloud/get-started" + link="/deploy/streamlit-community-cloud/get-started" background="lightBlue-70" /> @@ -71,4 +71,4 @@ If a request has been previously sent and denied, no option to grant or request ## What's next? -Now that you have your account you can [Explore your workspace](/streamlit-community-cloud/get-started/explore-your-workspace). Or if you're ready to go, jump right in and [Deploy your app](/streamlit-community-cloud/deploy-your-app). +Now that you have your account you can [Explore your workspace](/deploy/streamlit-community-cloud/get-started/explore-your-workspace). Or if you're ready to go, jump right in and [Deploy your app](/deploy/streamlit-community-cloud/deploy-your-app). diff --git a/content/streamlit-cloud/get-started/create-your-account.md b/content/deploy/community-cloud/get-started/create-your-account.md similarity index 80% rename from content/streamlit-cloud/get-started/create-your-account.md rename to content/deploy/community-cloud/get-started/create-your-account.md index 7d3c2c8fa..db9c26f1c 100644 --- a/content/streamlit-cloud/get-started/create-your-account.md +++ b/content/deploy/community-cloud/get-started/create-your-account.md @@ -1,6 +1,6 @@ --- title: Create your account -slug: /streamlit-community-cloud/get-started/create-your-account +slug: /deploy/streamlit-community-cloud/get-started/create-your-account --- # Create your account @@ -40,7 +40,7 @@ If you're sharing a private app, you will assign viewing permission by email. Th Enter your Google credentials -4. If you will be deploying or managing any apps, click "**Connect GitHub account**" and proceed to [Step 2: Source Control](/streamlit-community-cloud/get-started/create-your-account#step-2-source-control). If you are only going to be viewing apps and will not be using GitHub, you can click "**Skip this step**" and proceed to [Step 3: Set up your account](#step-3-set-up-your-account). +4. If you will be deploying or managing any apps, click "**Connect GitHub account**" and proceed to [Step 2: Source Control](/deploy/streamlit-community-cloud/get-started/create-your-account#step-2-source-control). If you are only going to be viewing apps and will not be using GitHub, you can click "**Skip this step**" and proceed to [Step 3: Set up your account](#step-3-set-up-your-account).
    Connect your GitHub account to Streamlit Community Cloud @@ -67,7 +67,7 @@ If you're sharing a private app, you will assign viewing permission by email. Th Streamlit Community Cloud sign-in email
    -5. If you will be deploying or managing any apps, click "**Connect GitHub account**" and proceed to [Step 2: Source control](/streamlit-community-cloud/get-started/create-your-account#step-2-source-control). If you are only going to be viewing apps and will not be using GitHub, you can click "**Skip this step**" and proceed to [Step 3: Set up your account](#step-3-set-up-your-account). +5. If you will be deploying or managing any apps, click "**Connect GitHub account**" and proceed to [Step 2: Source control](/deploy/streamlit-community-cloud/get-started/create-your-account#step-2-source-control). If you are only going to be viewing apps and will not be using GitHub, you can click "**Skip this step**" and proceed to [Step 3: Set up your account](#step-3-set-up-your-account).
    Connect your GitHub account to Streamlit Community Cloud @@ -77,7 +77,7 @@ If you're sharing a private app, you will assign viewing permission by email. Th Streamlit Community Cloud is integrated with GitHub for source control. If you begin your sign-up process with GitHub, you will not be directly prompted to create a primary identity. However, you can attach a Google account later. -There are two different authorization requests to completely [Connect your GitHub account](/streamlit-community-cloud/get-started/connect-your-github-account). You will encounter the first authorization request when you begin connecting your GitHub account. A second authorization is needed the first time you deploy an app. If you will be deploying or managing any apps from a GitHub organization, your authorization requests will include additional options to allow [Organization access](/streamlit-community-cloud/get-started/connect-github#organization-access). +There are two different authorization requests to completely [Connect your GitHub account](/deploy/streamlit-community-cloud/get-started/connect-your-github-account). You will encounter the first authorization request when you begin connecting your GitHub account. A second authorization is needed the first time you deploy an app. If you will be deploying or managing any apps from a GitHub organization, your authorization requests will include additional options to allow [Organization access](/deploy/streamlit-community-cloud/get-started/connect-github#organization-access). 1. After completing [Step 1: Primary identity](#step-1-primary-identity) or after clicking "**Continue with GitHub**" from the sign-up page, enter your GitHub credentials and click "**Sign in**". @@ -119,4 +119,4 @@ Congratulations on creating your Streamlit Community Cloud account! A warning ic ## What's next? -Now that you have your account you can [Explore your workspace](/streamlit-community-cloud/get-started/explore-your-workspace). Or if you're ready to go, jump right in and [Deploy your app](/streamlit-community-cloud/deploy-your-app). +Now that you have your account you can [Explore your workspace](/deploy/streamlit-community-cloud/get-started/explore-your-workspace). Or if you're ready to go, jump right in and [Deploy your app](/deploy/streamlit-community-cloud/deploy-your-app). diff --git a/content/streamlit-cloud/get-started/explore-your-workspace.md b/content/deploy/community-cloud/get-started/explore-your-workspace.md similarity index 59% rename from content/streamlit-cloud/get-started/explore-your-workspace.md rename to content/deploy/community-cloud/get-started/explore-your-workspace.md index f60bdaa10..d3683e3e1 100644 --- a/content/streamlit-cloud/get-started/explore-your-workspace.md +++ b/content/deploy/community-cloud/get-started/explore-your-workspace.md @@ -1,33 +1,33 @@ --- title: Explore your workspace -slug: /streamlit-community-cloud/get-started/explore-your-workspace +slug: /deploy/streamlit-community-cloud/get-started/explore-your-workspace --- # Explore your workspace -If you just [created your account](/streamlit-community-cloud/get-started/create-your-account), congrats! You are now logged in and ready to go. If you are joining someone else's workspace you may already see apps populated in your workspace. If not, then you need to deploy an app! Check out our next section on how to [Deploy your app](/streamlit-community-cloud/deploy-your-app). If you need an app to deploy, check out our App gallery which includes apps for machine learning, data science, and business use cases. +If you just [created your account](/deploy/streamlit-community-cloud/get-started/create-your-account), congrats! You are now logged in and ready to go. If you are joining someone else's workspace you may already see apps populated in your workspace. If not, then you need to deploy an app! Check out our next section on how to [Deploy your app](/deploy/streamlit-community-cloud/deploy-your-app). If you need an app to deploy, check out our App gallery which includes apps for machine learning, data science, and business use cases. ![Your Streamlit Community Cloud workspace](/images/streamlit-community-cloud/workspace-empty.png) ## Switching workspaces -You may also find that you already have access to multiple Streamlit Community Cloud workspaces. Streamlit Community Cloud automatically groups your apps according to the corresponding GitHub repository's owner or organzation. In the upper-right corner you can see the workspaces you have access to. If apps have already been deployed from any of your repositories, then you will see those apps when you select the associated workspace in the upper-right corner. Learn more about how to [Manage your app from your workspace](/streamlit-community-cloud/manage-your-app#manage-your-app-from-your-workspace). +You may also find that you already have access to multiple Streamlit Community Cloud workspaces. Streamlit Community Cloud automatically groups your apps according to the corresponding GitHub repository's owner or organzation. In the upper-right corner you can see the workspaces you have access to. If apps have already been deployed from any of your repositories, then you will see those apps when you select the associated workspace in the upper-right corner. Learn more about how to [Manage your app from your workspace](/deploy/streamlit-community-cloud/manage-your-app#manage-your-app-from-your-workspace). ![Switch between your Streamlit Community Cloud workspaces](/images/streamlit-community-cloud/workspace-empty-switch.png) ## New app button -Your workspace is your base of operations to deploy apps and manage them. You can click on "**New app**" to [Deploy your app](/streamlit-community-cloud/deploy-your-app) from a repository where you have administrative privileges. If you want additional options, click the down arrow (expand_more) to begin with a template. +Your workspace is your base of operations to deploy apps and manage them. You can click on "**New app**" to [Deploy your app](/deploy/streamlit-community-cloud/deploy-your-app) from a repository where you have administrative privileges. If you want additional options, click the down arrow (expand_more) to begin with a template. -- "**Use existing repo**" is the default to [Deploy your app](/streamlit-community-cloud/deploy-your-app) from a repository where you have administrative privileges. +- "**Use existing repo**" is the default to [Deploy your app](/deploy/streamlit-community-cloud/deploy-your-app) from a repository where you have administrative privileges. - "**Create from sample app template**" will fork and deploy a simple, one-page Streamlit app. -- "**Create new app with GitHub Codespaces**" will fork and deploy our multipage Streamlit Hello app and create a codespace. To jump quickly into GitHub Codespaces for any of your deployed apps, see [Edit your app with GitHub Codespaces](/streamlit-community-cloud/manage-your-app/edit-your-app#edit-your-app-with-github-codespaces) instead. +- "**Create new app with GitHub Codespaces**" will fork and deploy our multipage Streamlit Hello app and create a codespace. To jump quickly into GitHub Codespaces for any of your deployed apps, see [Edit your app with GitHub Codespaces](/deploy/streamlit-community-cloud/manage-your-app/edit-your-app#edit-your-app-with-github-codespaces) instead. ![Options to deploy a new app from your workspace in Streamlit Community Cloud](/images/streamlit-community-cloud/deploy-menu.png) ## Invite other developers to your workspace -Inviting other developers is simple, just invite them to your GitHub repository so that you can code on apps together, and then have them log in to share.streamlit.io/signup. Read more about connecting to a GitHub organization in [Organization access](/streamlit-community-cloud/get-started/connect-your-github-account#organization-access). +Inviting other developers is simple, just invite them to your GitHub repository so that you can code on apps together, and then have them log in to share.streamlit.io/signup. Read more about connecting to a GitHub organization in [Organization access](/deploy/streamlit-community-cloud/get-started/connect-your-github-account#organization-access). Streamlit Community Cloud inherits developer permissions from GitHub so when others sign in, they will automatically see the workspaces they share with you. From there you can all deploy, manage, and share apps together. diff --git a/content/streamlit-cloud/get-started/fork-and-edit.md b/content/deploy/community-cloud/get-started/fork-and-edit.md similarity index 81% rename from content/streamlit-cloud/get-started/fork-and-edit.md rename to content/deploy/community-cloud/get-started/fork-and-edit.md index 8b4a50a6a..39525cc66 100644 --- a/content/streamlit-cloud/get-started/fork-and-edit.md +++ b/content/deploy/community-cloud/get-started/fork-and-edit.md @@ -1,6 +1,6 @@ --- title: Fork and edit a public app -slug: /streamlit-community-cloud/get-started/fork-and-edit-a-public-app +slug: /deploy/streamlit-community-cloud/get-started/fork-and-edit-a-public-app --- # Fork and edit a public app @@ -11,7 +11,7 @@ Community Cloud is all about learning, sharing, and exploring the world of Strea ![Click Fork this app from a public app](/images/streamlit-community-cloud/fork-and-edit.png) -2. Click "**Fork!**" The repository will be forked to your GitHub account. If you have already forked the repository or have another repository of the same name, the fork will fail. In this case, you can manually fork the repository on GitHub, then follow the instructions to [Deploy your app](/streamlit-community-cloud/deploy-your-app#deploy-your-app) and [Edit your app with GitHub Codespaces](/streamlit-community-cloud/manage-your-app/edit-your-app#edit-your-app-with-github-codespaces). +2. Click "**Fork!**" The repository will be forked to your GitHub account. If you have already forked the repository or have another repository of the same name, the fork will fail. In this case, you can manually fork the repository on GitHub, then follow the instructions to [Deploy your app](/deploy/streamlit-community-cloud/deploy-your-app#deploy-your-app) and [Edit your app with GitHub Codespaces](/deploy/streamlit-community-cloud/manage-your-app/edit-your-app#edit-your-app-with-github-codespaces). ![Click Fork to confirm](/images/streamlit-community-cloud/fork-codespace-1.png) @@ -27,4 +27,4 @@ Community Cloud is all about learning, sharing, and exploring the world of Strea ![Your new GitHub Codespace](/images/streamlit-community-cloud/fork-cheatsheet-codespace.png) -You now have a copy the public app deployed from your account. You can edit and explore within your codespace and (if you choose) commit your changes to your deployed app to share with the world! 🌎 Learn more about editing your app in GitHub Codespaces, committing your edits to your repository, and shutting down your codespace in [Edit your app with GitHub Codespaces](/streamlit-community-cloud/manage-your-app/edit-your-app#edit-your-app-with-github-codespaces). +You now have a copy the public app deployed from your account. You can edit and explore within your codespace and (if you choose) commit your changes to your deployed app to share with the world! 🌎 Learn more about editing your app in GitHub Codespaces, committing your edits to your repository, and shutting down your codespace in [Edit your app with GitHub Codespaces](/deploy/streamlit-community-cloud/manage-your-app/edit-your-app#edit-your-app-with-github-codespaces). diff --git a/content/streamlit-cloud/get-started/quickstart.md b/content/deploy/community-cloud/get-started/quickstart.md similarity index 94% rename from content/streamlit-cloud/get-started/quickstart.md rename to content/deploy/community-cloud/get-started/quickstart.md index d22b18fac..f5ae88569 100644 --- a/content/streamlit-cloud/get-started/quickstart.md +++ b/content/deploy/community-cloud/get-started/quickstart.md @@ -1,13 +1,13 @@ --- title: Quickstart -slug: /streamlit-community-cloud/get-started/quickstart +slug: /deploy/streamlit-community-cloud/get-started/quickstart --- # Quickstart -This is a concise set of steps to create your Streamlit Community Cloud account, deploy a sample app, and start editing it with GitHub Codespaces. For other options and complete explanations, start with [Create your account](/streamlit-community-cloud/get-started/create-your-account). +This is a concise set of steps to create your Streamlit Community Cloud account, deploy a sample app, and start editing it with GitHub Codespaces. For other options and complete explanations, start with [Create your account](/deploy/streamlit-community-cloud/get-started/create-your-account). -You will be signing in to your Google and GitHub accounts during this process. If you do not already have these accounts, you can create them before you begin. If you do not want to use a Google account, you can [create your account with any email](/streamlit-community-cloud/get-started/create-your-account#primary-identity-option-2-email). +You will be signing in to your Google and GitHub accounts during this process. If you do not already have these accounts, you can create them before you begin. If you do not want to use a Google account, you can [create your account with any email](/deploy/streamlit-community-cloud/get-started/create-your-account#primary-identity-option-2-email). ## Sign up for Streamlit Community Cloud @@ -129,7 +129,7 @@ When you are done, remember to stop your codespace on GitHub to avoid any undesi
    -21. Congratulations! You just deployed an app to Streamlit Community Cloud. 🎉 Head back to your workspace at share.streamlit.io/ and [deploy another Streamlit app](/streamlit-community-cloud/deploy-your-app). +21. Congratulations! You just deployed an app to Streamlit Community Cloud. 🎉 Head back to your workspace at share.streamlit.io/ and [deploy another Streamlit app](/deploy/streamlit-community-cloud/deploy-your-app).
    See your deployed Streamlit app diff --git a/content/streamlit-cloud/get-started/security-model.md b/content/deploy/community-cloud/get-started/security-model.md similarity index 98% rename from content/streamlit-cloud/get-started/security-model.md rename to content/deploy/community-cloud/get-started/security-model.md index 81d528ea9..de919778e 100644 --- a/content/streamlit-cloud/get-started/security-model.md +++ b/content/deploy/community-cloud/get-started/security-model.md @@ -1,6 +1,6 @@ --- title: Streamlit Trust and Security -slug: /streamlit-community-cloud/get-started/trust-and-security +slug: /deploy/streamlit-community-cloud/get-started/trust-and-security --- # Streamlit trust and security diff --git a/content/streamlit-cloud/manage-your-account/index.md b/content/deploy/community-cloud/manage-your-account/_index.md similarity index 60% rename from content/streamlit-cloud/manage-your-account/index.md rename to content/deploy/community-cloud/manage-your-account/_index.md index 101a43408..65c36626c 100644 --- a/content/streamlit-cloud/manage-your-account/index.md +++ b/content/deploy/community-cloud/manage-your-account/_index.md @@ -1,11 +1,11 @@ --- title: Manage your account -slug: /streamlit-community-cloud/manage-your-account +slug: /deploy/streamlit-community-cloud/manage-your-account --- # Manage your account -You can [Update your email](/streamlit-community-cloud/manage-your-account/update-your-email) or [Delete your account](/streamlit-community-cloud/manage-your-account/delete-your-account) entirely through [Workspace settings](/streamlit-community-cloud/manage-your-account/workspace-settings). +You can [Update your email](/deploy/streamlit-community-cloud/manage-your-account/update-your-email) or [Delete your account](/deploy/streamlit-community-cloud/manage-your-account/delete-your-account) entirely through [Workspace settings](/deploy/streamlit-community-cloud/manage-your-account/workspace-settings). When using Streamlit Community Cloud, you have two identities behind your account: a primary identity (Google or email) and source control (GitHub). Your primary identity allows other users to share private apps with you and grant you access to their analytics. Your source control identity allows you to deploy apps from GitHub repositories and manage them through your Streamlit Community Cloud workspace. @@ -17,4 +17,4 @@ To manage your account, sign in to
    -Learn more about how to [Update your email](/streamlit-community-cloud/manage-your-account/update-your-email) and [Delete your account](/streamlit-community-cloud/manage-your-account/delete-your-account). +Learn more about how to [Update your email](/deploy/streamlit-community-cloud/manage-your-account/update-your-email) and [Delete your account](/deploy/streamlit-community-cloud/manage-your-account/delete-your-account). diff --git a/content/streamlit-cloud/manage-your-account/delete-your-account.md b/content/deploy/community-cloud/manage-your-account/delete-your-account.md similarity index 84% rename from content/streamlit-cloud/manage-your-account/delete-your-account.md rename to content/deploy/community-cloud/manage-your-account/delete-your-account.md index 9923e8a6f..1f9685b5b 100644 --- a/content/streamlit-cloud/manage-your-account/delete-your-account.md +++ b/content/deploy/community-cloud/manage-your-account/delete-your-account.md @@ -1,11 +1,11 @@ --- title: Delete your account -slug: /streamlit-community-cloud/manage-your-account/delete-your-account +slug: /deploy/streamlit-community-cloud/manage-your-account/delete-your-account --- # Delete your account -Deleting your Streamlit Community Cloud account is just as easy as creating it. When you delete your account, your information, account, and all your hosted apps are deleted as well. Read more about data deletion in [Streamlit trust and security](/streamlit-community-cloud/get-started/trust-and-security#data-deletion). +Deleting your Streamlit Community Cloud account is just as easy as creating it. When you delete your account, your information, account, and all your hosted apps are deleted as well. Read more about data deletion in [Streamlit trust and security](/deploy/streamlit-community-cloud/get-started/trust-and-security#data-deletion). @@ -17,7 +17,7 @@ Deleting your account is permanent and cannot be undone. Make sure you really wa Follow these steps to delete your account: -1. Sign in to Streamlit Community Cloud at share.streamlit.io and access your [Workspace settings](/streamlit-community-cloud/manage-your-account/workspace-settings). +1. Sign in to Streamlit Community Cloud at share.streamlit.io and access your [Workspace settings](/deploy/streamlit-community-cloud/manage-your-account/workspace-settings). 2. From the "Linked accounts" section, click "**Delete account**". diff --git a/content/streamlit-cloud/manage-your-account/manage-your-github-connection.md b/content/deploy/community-cloud/manage-your-account/manage-your-github-connection.md similarity index 83% rename from content/streamlit-cloud/manage-your-account/manage-your-github-connection.md rename to content/deploy/community-cloud/manage-your-account/manage-your-github-connection.md index 65aa4735c..70de87f12 100644 --- a/content/streamlit-cloud/manage-your-account/manage-your-github-connection.md +++ b/content/deploy/community-cloud/manage-your-account/manage-your-github-connection.md @@ -1,6 +1,6 @@ --- title: Manage your GitHub connection -slug: /streamlit-community-cloud/manage-your-account/manage-your-github-connection +slug: /deploy/streamlit-community-cloud/manage-your-account/manage-your-github-connection --- # Manage your GitHub connection @@ -9,12 +9,12 @@ If you did not connect GitHub when you created your account or need to correct y If you are not fully logged in and authorized to both a primary identity (Google or email) and source control (GitHub), there will be a warning symbol in the upper-right corner of your workspace. This can mean one of three things: -* You are not signed in to a primary identity (Google or email). - * See [Connect Google to your account](/streamlit-community-cloud/manage-your-account/update-your-email#connect-google-to-your-account). -* You are not signed in to source control (GitHub.) - * See [Connecting GitHub to an existing primary identity](#connecting-github-to-an-existing-primary-identity). -* Your source control has incomplete permissions. - * Access your workspace settings see [Authorize Streamlit to access private repositories](#authorize-streamlit-to-access-private-repositories). +- You are not signed in to a primary identity (Google or email). + - See [Connect Google to your account](/deploy/streamlit-community-cloud/manage-your-account/update-your-email#connect-google-to-your-account). +- You are not signed in to source control (GitHub.) + - See [Connecting GitHub to an existing primary identity](#connecting-github-to-an-existing-primary-identity). +- Your source control has incomplete permissions. + - Access your workspace settings see [Authorize Streamlit to access private repositories](#authorize-streamlit-to-access-private-repositories). Authorize your GitHub account @@ -25,8 +25,7 @@ If you created your account without connecting GitHub or if you disconnected Git 1. Click "**Settings**" in the upper-right corner of your workspace. 2. If you do not have GitHub connected, a warning is displayed saying, "**You are not signed in with a source control account**". - If instead you see "**Streamlit does not have access to private repos on this GitHub account**" skip to step 5. -3. Click "**Sign in with GitHub**". +If instead you see "**Streamlit does not have access to private repos on this GitHub account**" skip to step 5. 3. Click "**Sign in with GitHub**".
    Sign in with GitHub to connect GitHub to your Streamlit Community Cloud account @@ -58,7 +57,7 @@ GitHub is now connected to your account! 🥳 ## Authorizing with an organization -If you are in an organization, you can grant or request access to that organization when you connect your GitHub account. Read more about [Organization access](/streamlit-community-cloud/get-started/connect-your-github-account#organization-access). +If you are in an organization, you can grant or request access to that organization when you connect your GitHub account. Read more about [Organization access](/deploy/streamlit-community-cloud/get-started/connect-your-github-account#organization-access). If your GitHub account is already connected, you can remove permissions in your GitHub settings and force Streamlit to reprompt for GitHub authorization the next time you sign into Streamlit Community Cloud. @@ -83,7 +82,7 @@ If your GitHub account is already connected, you can remove permissions in your Confirm to revoke access for Streamlit to your GitHub account
    -5. Return to share.streamlit.io and sign in. You will be prompted to authorize GitHub as explained in [Connect GitHub](/streamlit-community-cloud/get-started/connect-your-github-account#organization-access). +5. Return to share.streamlit.io and sign in. You will be prompted to authorize GitHub as explained in [Connect GitHub](/deploy/streamlit-community-cloud/get-started/connect-your-github-account#organization-access). ### Granting previously denied access diff --git a/content/streamlit-cloud/manage-your-account/sign-in-sign-out.md b/content/deploy/community-cloud/manage-your-account/sign-in-sign-out.md similarity index 55% rename from content/streamlit-cloud/manage-your-account/sign-in-sign-out.md rename to content/deploy/community-cloud/manage-your-account/sign-in-sign-out.md index 1e0804e2f..3eeb9b846 100644 --- a/content/streamlit-cloud/manage-your-account/sign-in-sign-out.md +++ b/content/deploy/community-cloud/manage-your-account/sign-in-sign-out.md @@ -1,6 +1,6 @@ --- title: Sign in & sign out -slug: /streamlit-community-cloud/manage-your-account/sign-in-sign-out +slug: /deploy/streamlit-community-cloud/manage-your-account/sign-in-sign-out --- # Sign in & sign out @@ -13,17 +13,17 @@ Once you've created your account, you can sign in to share.streamlit.io and click "**Continue with Google**". -
    - Sign in to Streamlit Community Cloud with Google -
    +
    + Sign in to Streamlit Community Cloud with Google +
    2. Enter your Google account credentials. -
    - Enter your Google credentials to sign in to Streamlit Community Cloud -
    +
    + Enter your Google credentials to sign in to Streamlit Community Cloud +
    -3. If your account is already linked to GitHub, you may be immediately prompted to sign in with GitHub. Once you have signed in, you can [Explore your workspace!](/streamlit-community-cloud/get-started/explore-your-workspace). 🎈 +3. If your account is already linked to GitHub, you may be immediately prompted to sign in with GitHub. Once you have signed in, you can [Explore your workspace!](/deploy/streamlit-community-cloud/get-started/explore-your-workspace). 🎈 ## Sign in with GitHub @@ -35,33 +35,33 @@ Once you've created your account, you can sign in to - +
    + GitHub sign-in +
    -3. Once you have signed in to GitHub, you can [Explore your workspace!](/streamlit-community-cloud/get-started/explore-your-workspace). 🎈 +3. Once you have signed in to GitHub, you can [Explore your workspace!](/deploy/streamlit-community-cloud/get-started/explore-your-workspace). 🎈 ## Sign in with Email 1. Visit
    share.streamlit.io and enter the email you used to create your Streamlit Community Cloud account. Click "**Continue with email**". -
    - Email sign-in -
    +
    + Email sign-in +
    2. You will see a confirmation message asking you to check your email. -
    - Email sign-in -
    +
    + Email sign-in +
    3. Check your inbox for an email with the subject "**Sign in to Streamlit Cloud**". Click the link in the email to sign in to Streamlit Community Cloud. Note that this link will expire in 15 minutes and can only be used once. -
    - Email sign-in -
    +
    + Email sign-in +
    -3. Once you click the link in your email, you can [Explore your workspace!](/streamlit-community-cloud/get-started/explore-your-workspace). 🎈 +4. Once you click the link in your email, you can [Explore your workspace!](/deploy/streamlit-community-cloud/get-started/explore-your-workspace). 🎈 ## Sign out of your account @@ -69,4 +69,4 @@ From your workspace, click on your workspace name in the upper-right corner. Cli
    Sign out of Streamlit Community Cloud -
    \ No newline at end of file + diff --git a/content/streamlit-cloud/manage-your-account/update-your-email.md b/content/deploy/community-cloud/manage-your-account/update-your-email.md similarity index 86% rename from content/streamlit-cloud/manage-your-account/update-your-email.md rename to content/deploy/community-cloud/manage-your-account/update-your-email.md index 8238c68ac..eae523bff 100644 --- a/content/streamlit-cloud/manage-your-account/update-your-email.md +++ b/content/deploy/community-cloud/manage-your-account/update-your-email.md @@ -1,11 +1,11 @@ --- title: Update your email -slug: /streamlit-community-cloud/manage-your-account/update-your-email +slug: /deploy/streamlit-community-cloud/manage-your-account/update-your-email --- # Update your email -If you wish to update your email on Streamlit Community Cloud, you can do so via your [Workspace settings](/streamlit-community-cloud/manage-your-account/workspace-settings). Updating your email changes the primary identity of your account. Once updated, if your account's email is associated with a Google account, you can sign in with Google OAuth. Otherwise, you through emailed links. The latter involves typing in your email, after which we'll send you a unique, single-use link (valid for 15 minutes). +If you wish to update your email on Streamlit Community Cloud, you can do so via your [Workspace settings](/deploy/streamlit-community-cloud/manage-your-account/workspace-settings). Updating your email changes the primary identity of your account. Once updated, if your account's email is associated with a Google account, you can sign in with Google OAuth. Otherwise, you through emailed links. The latter involves typing in your email, after which we'll send you a unique, single-use link (valid for 15 minutes). If you are signed in to GitHub and don't already have a primary identity on your account, see [Connect Google to your account](#connect-google-to-your-account). @@ -55,7 +55,7 @@ If your confirmation link expires, don't worry! You can resend it by following t ## Troubleshooting -If you click the confirmation link in a browser session where you are not signed in, you will be informed that "Sign in is required." If you try to sign in with your new email, you will create a second account instead. You cannot resend your confirmation link while you have this second account. If you accidentally created a second account, you can follow the steps to [Delete your account](/streamlit-community-cloud/manage-your-account/delete-your-account) to get rid of the duplicate. Afterwards, [Resend your confirmation link](#resend-your-confirmation-link) from your first account. +If you click the confirmation link in a browser session where you are not signed in, you will be informed that "Sign in is required." If you try to sign in with your new email, you will create a second account instead. You cannot resend your confirmation link while you have this second account. If you accidentally created a second account, you can follow the steps to [Delete your account](/deploy/streamlit-community-cloud/manage-your-account/delete-your-account) to get rid of the duplicate. Afterwards, [Resend your confirmation link](#resend-your-confirmation-link) from your first account. ## Connect Google to your account diff --git a/content/streamlit-cloud/manage-your-account/workspace-settings.md b/content/deploy/community-cloud/manage-your-account/workspace-settings.md similarity index 66% rename from content/streamlit-cloud/manage-your-account/workspace-settings.md rename to content/deploy/community-cloud/manage-your-account/workspace-settings.md index 7d5e3f9f6..750b20be0 100644 --- a/content/streamlit-cloud/manage-your-account/workspace-settings.md +++ b/content/deploy/community-cloud/manage-your-account/workspace-settings.md @@ -1,11 +1,11 @@ --- title: Workspace settings -slug: /streamlit-community-cloud/manage-your-account/workspace-settings +slug: /deploy/streamlit-community-cloud/manage-your-account/workspace-settings --- # Workspace settings -From your workspace settings you can [Manage your account](/streamlit-community-cloud/manage-your-account), see your [App resources and limits](/streamlit-community-cloud/manage-your-app#app-resources-and-limits) and access support resources. +From your workspace settings you can [Manage your account](/deploy/streamlit-community-cloud/manage-your-account), see your [App resources and limits](/deploy/streamlit-community-cloud/manage-your-app#app-resources-and-limits) and access support resources. ## Access your workspace settings @@ -15,13 +15,13 @@ From your workspace at shar ## Linked accounts -The "**Linked accounts**" section shows your current primary identity and source control account. To learn more, see [Manage your account](/streamlit-community-cloud/manage-your-account). +The "**Linked accounts**" section shows your current primary identity and source control account. To learn more, see [Manage your account](/deploy/streamlit-community-cloud/manage-your-account). ![Manage your linked accounts in workspace settings](/images/streamlit-community-cloud/account-primary-identity-and-source-control.png) ## Limits -The "**Limits**" section shows your current resources and limits. To learn more, see [App resources and limits](/streamlit-community-cloud/manage-your-app#app-resources-and-limits). +The "**Limits**" section shows your current resources and limits. To learn more, see [App resources and limits](/deploy/streamlit-community-cloud/manage-your-app#app-resources-and-limits). ![Resource limits displayed in workspace settings](/images/streamlit-community-cloud/workspace-limits.png) diff --git a/content/streamlit-cloud/manage-your-app/index.md b/content/deploy/community-cloud/manage-your-app/_index.md similarity index 81% rename from content/streamlit-cloud/manage-your-app/index.md rename to content/deploy/community-cloud/manage-your-app/_index.md index 2b1b6facd..09a69a49e 100644 --- a/content/streamlit-cloud/manage-your-app/index.md +++ b/content/deploy/community-cloud/manage-your-app/_index.md @@ -1,6 +1,6 @@ --- title: Manage your app -slug: /streamlit-community-cloud/manage-your-app +slug: /deploy/streamlit-community-cloud/manage-your-app --- # Manage your app @@ -17,19 +17,19 @@ To deploy or manage any app, always switch to the workspace matching the reposit ![Switching between app workspaces in Streamlit Community Cloud](/images/streamlit-community-cloud/workspace-switch.png) -At the top of your workspace, "**Analytics**" is a shortcut to [App analytics](/streamlit-community-cloud/manage-your-app/app-analytics) and "**Settings**" links to your [Workspace settings](/streamlit-community-cloud/manage-your-account/workspace-settings) (not to be confused with [App settings](/streamlit-community-cloud/manage-your-app/app-settings) for each of your apps). +At the top of your workspace, "**Analytics**" is a shortcut to [App analytics](/deploy/streamlit-community-cloud/manage-your-app/app-analytics) and "**Settings**" links to your [Workspace settings](/deploy/streamlit-community-cloud/manage-your-account/workspace-settings) (not to be confused with [App settings](/deploy/streamlit-community-cloud/manage-your-app/app-settings) for each of your apps). ### App overflow menus Each app has a menu accessible from the overflow icon (more_vert) to the right. -- **Copy URL** — See [Copy your app's URL](/streamlit-community-cloud/share-your-app#copy-your-apps-url) -- **Edit** — See [Edit your app with GitHub Codespaces](/streamlit-community-cloud/manage-your-app/edit-your-app#edit-your-app-with-github-codespaces) -- **Favorite** — See [Favorite your app](/streamlit-community-cloud/manage-your-app/favorite-your-app) -- **Analytics** — See [App analytics](/streamlit-community-cloud/manage-your-app/app-analytics) -- **Reboot** — See [Reboot your app](/streamlit-community-cloud/manage-your-app/reboot-your-app) -- **Delete** — See [Delete your app](/streamlit-community-cloud/manage-your-app/delete-your-app) -- **Settings** — See [App settings](/streamlit-community-cloud/manage-your-app/app-settings) +- **Copy URL** — See [Copy your app's URL](/deploy/streamlit-community-cloud/share-your-app#copy-your-apps-url) +- **Edit** — See [Edit your app with GitHub Codespaces](/deploy/streamlit-community-cloud/manage-your-app/edit-your-app#edit-your-app-with-github-codespaces) +- **Favorite** — See [Favorite your app](/deploy/streamlit-community-cloud/manage-your-app/favorite-your-app) +- **Analytics** — See [App analytics](/deploy/streamlit-community-cloud/manage-your-app/app-analytics) +- **Reboot** — See [Reboot your app](/deploy/streamlit-community-cloud/manage-your-app/reboot-your-app) +- **Delete** — See [Delete your app](/deploy/streamlit-community-cloud/manage-your-app/delete-your-app) +- **Settings** — See [App settings](/deploy/streamlit-community-cloud/manage-your-app/app-settings) ![App overflow menu in your workspace](/images/streamlit-community-cloud/workspace-app-overflow.png) @@ -61,10 +61,10 @@ You can manage your deployed app directly from the app itself! Just make sure yo Other options accessible from Cloud logs are: -- **Analytics** — See [App analytics](/streamlit-community-cloud/manage-your-app/app-analytics). -- **Reboot app** — See [Reboot your app](/streamlit-community-cloud/manage-your-app/reboot-your-app). -- **Delete app** — See [Delete your app](/streamlit-community-cloud/manage-your-app/delete-your-app). -- **Settings** — See [App settings](/streamlit-community-cloud/manage-your-app/app-settings). +- **Analytics** — See [App analytics](/deploy/streamlit-community-cloud/manage-your-app/app-analytics). +- **Reboot app** — See [Reboot your app](/deploy/streamlit-community-cloud/manage-your-app/reboot-your-app). +- **Delete app** — See [Delete your app](/deploy/streamlit-community-cloud/manage-your-app/delete-your-app). +- **Settings** — See [App settings](/deploy/streamlit-community-cloud/manage-your-app/app-settings). - **Your apps** — Takes you to your [app workspace](#manage-your-app-from-your-workspace). - **Documentation** — Takes you to our documentation. - **Support** — Takes you to our forums! @@ -79,7 +79,7 @@ Other options accessible from Cloud logs are: ### App menus -From your app at `.streamlit.app`, you can always access your [app's menu](/library/advanced-features/app-menu) just like you can when developing locally. The option to deploy your app is removed, but you can still clear your cache from here. +From your app at `.streamlit.app`, you can always access your [app's menu](/develop/concepts/architecture/app-chrome) just like you can when developing locally. The option to deploy your app is removed, but you can still clear your cache from here. ![App menus in Streamlit Community Cloud](/images/streamlit-community-cloud/app-menu.png) diff --git a/content/streamlit-cloud/manage-your-app/app-analytics.md b/content/deploy/community-cloud/manage-your-app/app-analytics.md similarity index 86% rename from content/streamlit-cloud/manage-your-app/app-analytics.md rename to content/deploy/community-cloud/manage-your-app/app-analytics.md index 8e486cef8..60709b2f7 100644 --- a/content/streamlit-cloud/manage-your-app/app-analytics.md +++ b/content/deploy/community-cloud/manage-your-app/app-analytics.md @@ -1,22 +1,24 @@ --- title: App analytics -slug: /streamlit-community-cloud/manage-your-app/app-analytics +slug: /deploy/streamlit-community-cloud/manage-your-app/app-analytics --- # App analytics Streamlit Community Cloud allows you to see the viewership of each of your apps. Specifically, you can see: -* The total viewers count of your app (counted from April 2022). -* The most recent unique viewers (capped up to your last 20 viewers). -* A relative timestamp of each unique viewer's last visit. + +- The total viewers count of your app (counted from April 2022). +- The most recent unique viewers (capped up to your last 20 viewers). +- A relative timestamp of each unique viewer's last visit. ![App analytics on Streamlit Community Cloud](/images/streamlit-community-cloud/workspace-app-analytics-viewers.png) ## Access your app analytics You can get to your app's analytics: -* [From your workspace](#access-app-analytics-from-your-workspace). -* [From your Cloud logs](#access-app-analytics-from-your-cloud-logs). + +- [From your workspace](#access-app-analytics-from-your-workspace). +- [From your Cloud logs](#access-app-analytics-from-your-cloud-logs). ### Access app analytics from your workspace @@ -50,7 +52,7 @@ For public apps, we anonymize all viewers outside your workspace to protect thei -When you invite a viewer to an app, they gain access to analytics as well. Additionally, if someone is invited as a viewer to *any* app in your workspace, they can see analytics for all public apps in your workspace and invite additional viewers themselves. A viewer in your workspace may see the emails of developers and other viewers in your workspace through analytics. +When you invite a viewer to an app, they gain access to analytics as well. Additionally, if someone is invited as a viewer to _any_ app in your workspace, they can see analytics for all public apps in your workspace and invite additional viewers themselves. A viewer in your workspace may see the emails of developers and other viewers in your workspace through analytics. diff --git a/content/streamlit-cloud/manage-your-app/app-settings.md b/content/deploy/community-cloud/manage-your-app/app-settings.md similarity index 62% rename from content/streamlit-cloud/manage-your-app/app-settings.md rename to content/deploy/community-cloud/manage-your-app/app-settings.md index 678bd5a6e..3095ff09f 100644 --- a/content/streamlit-cloud/manage-your-app/app-settings.md +++ b/content/deploy/community-cloud/manage-your-app/app-settings.md @@ -1,19 +1,20 @@ --- title: App settings -slug: /streamlit-community-cloud/manage-your-app/app-settings +slug: /deploy/streamlit-community-cloud/manage-your-app/app-settings --- # App settings -This page is about your app settings on Streamlit Community Cloud. From your app settings you can [view or modify your app's URL](/streamlit-community-cloud/deploy-your-app#custom-subdomains), [manage public or private access to your apps](/streamlit-community-cloud/share-your-app) and [update your saved secrets for your apps](/streamlit-community-cloud/deploy-your-app/secrets-management). +This page is about your app settings on Streamlit Community Cloud. From your app settings you can [view or modify your app's URL](/deploy/streamlit-community-cloud/deploy-your-app#custom-subdomains), [manage public or private access to your apps](/deploy/streamlit-community-cloud/share-your-app) and [update your saved secrets for your apps](/deploy/streamlit-community-cloud/deploy-your-app/secrets-management). -If you access "**Settings**" from your [App menu](/library/advanced-features/app-menu) in the upper-right corner of your running app, you can access features to control the appearance of your app while its running. +If you access "**Settings**" from your [App menu](/develop/concepts/architecture/app-chrome) in the upper-right corner of your running app, you can access features to control the appearance of your app while its running. ## Access your app settings You can get to your app's settings: -* [From your workspace](#access-app-settings-from-your-workspace). -* [From your Cloud logs](#access-app-settings-from-your-cloud-logs). + +- [From your workspace](#access-app-settings-from-your-workspace). +- [From your Cloud logs](#access-app-settings-from-your-cloud-logs). ### Access app settings from your workspace @@ -34,16 +35,19 @@ Click the overflow menu icon (share.streamlit.io, click the overflow icon (more_vert) next to your app. Click "**Favorite**". - ![Favorite your app from your workspace](/images/streamlit-community-cloud/workspace-app-favorite.png) + ![Favorite your app from your workspace](/images/streamlit-community-cloud/workspace-app-favorite.png) 2. Your favorited app will move to the top of your list (with other favorited apps if you have them) and display with a yellow star. - ![Favorited app in your workspace](/images/streamlit-community-cloud/workspace-app-favorited.png) + ![Favorited app in your workspace](/images/streamlit-community-cloud/workspace-app-favorited.png) -* Once favorited, from the same menu, click "**Unfavorite**" to remove the star. +- Once favorited, from the same menu, click "**Unfavorite**" to remove the star. - ![Unfavorite your app from your workspace](/images/streamlit-community-cloud/workspace-app-unfavorite.png) + ![Unfavorite your app from your workspace](/images/streamlit-community-cloud/workspace-app-unfavorite.png) Alternatively, you can favorite and unfavorite apps by clicking directly on the star next to their names. (Hover over an unfavorited app to reveal an empty star icon next to its name.) diff --git a/content/streamlit-cloud/manage-your-app/reboot-your-app.md b/content/deploy/community-cloud/manage-your-app/reboot-your-app.md similarity index 56% rename from content/streamlit-cloud/manage-your-app/reboot-your-app.md rename to content/deploy/community-cloud/manage-your-app/reboot-your-app.md index ae897ac36..f6f6bd82d 100644 --- a/content/streamlit-cloud/manage-your-app/reboot-your-app.md +++ b/content/deploy/community-cloud/manage-your-app/reboot-your-app.md @@ -1,6 +1,6 @@ --- title: Reboot your app -slug: /streamlit-community-cloud/manage-your-app/reboot-your-app +slug: /deploy/streamlit-community-cloud/manage-your-app/reboot-your-app --- # Reboot your app @@ -8,33 +8,34 @@ slug: /streamlit-community-cloud/manage-your-app/reboot-your-app If you need to clear your app's memory or force a fresh build after modifying a file that Streamlit Community Cloud doesn't monitor, you may need to reboot your app. This will interrupt any user who may currently be using your app and may take a few minutes for your app to re-deploy. Anyone visiting your app will see "Your app is in the oven" during a reboot. Rebooting your app on Streamlit Community Cloud is easy! You can reboot your app: -* [From your workspace](#reboot-your-app-from-your-workspace). -* [From your Cloud logs](#reboot-your-app-from-your-cloud-logs). + +- [From your workspace](#reboot-your-app-from-your-workspace). +- [From your Cloud logs](#reboot-your-app-from-your-cloud-logs). ### Reboot your app from your workspace 1. From your workspace at share.streamlit.io, click the overflow icon (more_vert) next to your app. Click "**Reboot**". - ![Reboot your app from your workspace](/images/streamlit-community-cloud/workspace-app-reboot.png) + ![Reboot your app from your workspace](/images/streamlit-community-cloud/workspace-app-reboot.png) 2. A confirmation will display. Click "**Reboot**". -
    - Confirm rebooting your app in Streamlit Community Cloud -
    +
    +Confirm rebooting your app in Streamlit Community Cloud +
    ### Reboot your app from your Cloud logs 1. From your app at `.streamlit.app`, click "**Manage app**" in the lower-right corner. - ![Access Streamlit Community Cloud logs from your app](/images/streamlit-community-cloud/cloud-logs-open.png) + ![Access Streamlit Community Cloud logs from your app](/images/streamlit-community-cloud/cloud-logs-open.png) 2. Click the overflow menu icon (more_vert) and click "**Reboot app**". - ![Reboot your app from your Cloud logs](/images/streamlit-community-cloud/cloud-logs-menu-reboot.png) + ![Reboot your app from your Cloud logs](/images/streamlit-community-cloud/cloud-logs-menu-reboot.png) 3. A confirmation will display. Click "**Reboot**". -
    - Confirm rebooting your app in Streamlit Community Cloud -
    +
    +Confirm rebooting your app in Streamlit Community Cloud +
    diff --git a/content/streamlit-cloud/share-your-app/index.md b/content/deploy/community-cloud/share-your-app/_index.md similarity index 94% rename from content/streamlit-cloud/share-your-app/index.md rename to content/deploy/community-cloud/share-your-app/_index.md index 0ce761550..50c65451d 100644 --- a/content/streamlit-cloud/share-your-app/index.md +++ b/content/deploy/community-cloud/share-your-app/_index.md @@ -1,6 +1,6 @@ --- title: Share your app -slug: /streamlit-community-cloud/share-your-app +slug: /deploy/streamlit-community-cloud/share-your-app --- # Share your app @@ -21,7 +21,7 @@ If you deployed your app from a public repository, your app will be public by de ### Set privacy from your app settings -1. Access your [App settings](/streamlit-community-cloud/manage-your-app/app-settings) and go to the "**Sharing**" section. +1. Access your [App settings](/deploy/streamlit-community-cloud/manage-your-app/app-settings) and go to the "**Sharing**" section. ![Share settings on Streamlit Community Cloud](/images/streamlit-community-cloud/workspace-app-settings-sharing.png) @@ -58,7 +58,7 @@ Use the social media sharing buttons to post your app on our forum! We'd love to ### Invite viewers by email -Whether your app is public or private, you can send an email invite to your app directly from Streamlit Community Cloud. This grants the viewer access to analytics for all your public apps and the ability to invite other viewers to your workspace. Developers and invited viewers are identified by their email in analytics instead of appearing anonymously (if they view any of your apps while logged in). Read more about viewers in [App analytics](/streamlit-community-cloud/manage-your-app/app-analytics). +Whether your app is public or private, you can send an email invite to your app directly from Streamlit Community Cloud. This grants the viewer access to analytics for all your public apps and the ability to invite other viewers to your workspace. Developers and invited viewers are identified by their email in analytics instead of appearing anonymously (if they view any of your apps while logged in). Read more about viewers in [App analytics](/deploy/streamlit-community-cloud/manage-your-app/app-analytics). 1. From your app at `.streamlit.app`, click "**Share**" in the upper-right corner. 2. Enter an email address and click "**Invite**". @@ -113,7 +113,7 @@ Once you have added someone's email address to your app's viewer list, that pers -When you add a viewer to any app in your workspace, they are granted access to analytics for that app as well as analytics for all your public apps. They can also pass these permissions to others by inviting more viewers. All viewers and developers in your workspace are identified by their email in analytics. Furthermore, their emails show in analytics for every app in your workspace and not just apps they are explicitly invited to. Read more about viewers in [App analytics](/streamlit-community-cloud/manage-your-app/app-analytics) +When you add a viewer to any app in your workspace, they are granted access to analytics for that app as well as analytics for all your public apps. They can also pass these permissions to others by inviting more viewers. All viewers and developers in your workspace are identified by their email in analytics. Furthermore, their emails show in analytics for every app in your workspace and not just apps they are explicitly invited to. Read more about viewers in [App analytics](/deploy/streamlit-community-cloud/manage-your-app/app-analytics) @@ -141,7 +141,7 @@ When you add a viewer to any app in your workspace, they are granted access to a ### Invite viewers from your app settings -1. Access your [App settings](/streamlit-community-cloud/manage-your-app/app-settings) and go to the "**Sharing**" section. +1. Access your [App settings](/deploy/streamlit-community-cloud/manage-your-app/app-settings) and go to the "**Sharing**" section. ![Access sharing settings from your app settings](/images/streamlit-community-cloud/workspace-app-settings-sharing.png) diff --git a/content/streamlit-cloud/share-your-app/embed-your-app.md b/content/deploy/community-cloud/share-your-app/embed-your-app.md similarity index 94% rename from content/streamlit-cloud/share-your-app/embed-your-app.md rename to content/deploy/community-cloud/share-your-app/embed-your-app.md index 2f67312e7..1cfa81be4 100644 --- a/content/streamlit-cloud/share-your-app/embed-your-app.md +++ b/content/deploy/community-cloud/share-your-app/embed-your-app.md @@ -1,6 +1,6 @@ --- title: Embed your app -slug: /streamlit-community-cloud/share-your-app/embed-your-app +slug: /deploy/streamlit-community-cloud/share-your-app/embed-your-app --- # Embed your app @@ -86,7 +86,7 @@ The only noteworthy differences between the methods is that iframing allows you When [Embedding with iframes](#embedding-with-iframes), Streamlit allows you to specify one or more instances of the `?embed_options` query parameter for granular control over the embedding behavior. -Both `?embed` and `?embed_options` are invisible to [`st.query_params`](/library/api-reference/utilities/st.query_params) and its precursors, [`st.experimental_get_query_params`](/library/api-reference/utilities/st.experimental_get_query_params) and [`st.experimental_set_query_params`](/library/api-reference/utilities/st.experimental_set_query_params). You can't get or set their values. +Both `?embed` and `?embed_options` are invisible to [`st.query_params`](/develop/api-reference/caching-and-state/st.query_params) and its precursors, [`st.experimental_get_query_params`](/develop/api-reference/caching-and-state/st.experimental_get_query_params) and [`st.experimental_set_query_params`](/develop/api-reference/caching-and-state/st.experimental_set_query_params). You can't get or set their values. The supported values for `?embed_options` are listed below: diff --git a/content/streamlit-cloud/share-your-app/indexability.md b/content/deploy/community-cloud/share-your-app/indexability.md similarity index 86% rename from content/streamlit-cloud/share-your-app/indexability.md rename to content/deploy/community-cloud/share-your-app/indexability.md index dd47d163c..46607735c 100644 --- a/content/streamlit-cloud/share-your-app/indexability.md +++ b/content/deploy/community-cloud/share-your-app/indexability.md @@ -1,6 +1,6 @@ --- title: SEO and search indexability -slug: /streamlit-community-cloud/share-your-app/indexability +slug: /deploy/streamlit-community-cloud/share-your-app/indexability --- # SEO and search indexability @@ -18,11 +18,11 @@ Here are some tips to help you get the most out of app indexability: ### Make sure your app is public -All public apps hosted on Streamlit Community Cloud are indexed by search engines. If your app is private, it will not be indexed by search engines. To make your private app public, read [Share your app](/streamlit-community-cloud/share-your-app). +All public apps hosted on Streamlit Community Cloud are indexed by search engines. If your app is private, it will not be indexed by search engines. To make your private app public, read [Share your app](/deploy/streamlit-community-cloud/share-your-app). ### Choose a custom subdomain early -Streamlit Community Cloud automatically generates a random subdomain for your app. However, subdomains are customizable! Custom subdomains modify your app URLs to reflect your app content, personal branding, or whatever you’d like. Read more about custom subdomains in [Custom subdomains](/streamlit-community-cloud/deploy-your-app#custom-subdomains). +Streamlit Community Cloud automatically generates a random subdomain for your app. However, subdomains are customizable! Custom subdomains modify your app URLs to reflect your app content, personal branding, or whatever you’d like. Read more about custom subdomains in [Custom subdomains](/deploy/streamlit-community-cloud/deploy-your-app#custom-subdomains). By choosing a custom subdomain, you can use it to help people find your app. For example, if you're deploying an app that generates training data, you might choose a subdomain like `traingenerator.streamlit.app`. This makes it easy for people to find your app by searching for "training generator" or "train generator streamlit app." @@ -30,7 +30,7 @@ We recommend choosing a custom subdomain when you deploy your app. This ensures ### Choose a descriptive app title -The meta title of your app is the text that appears in search engine results. It is also the text that appears in the browser tab when your app is open. By default, the meta title of your app is the same as the title of your app. However, you can customize the meta title of your app by setting the [`st.set_page_config`](/library/api-reference/utilities/st.set_page_config) parameter `page_title` to a custom string. For example: +The meta title of your app is the text that appears in search engine results. It is also the text that appears in the browser tab when your app is open. By default, the meta title of your app is the same as the title of your app. However, you can customize the meta title of your app by setting the [`st.set_page_config`](/develop/api-reference/configuration/st.set_page_config) parameter `page_title` to a custom string. For example: ```python st.set_page_config(page_title="Traingenerator") @@ -60,6 +60,6 @@ Example: `site:traingenerator.streamlit.app` ## What if I don't want my app to be indexed? -If you don't want your app to be indexed by search engines, you can make it private. Read [Share your app](/streamlit-community-cloud/share-your-app) to learn more about making your app private. Note: each workspace can only have one private app. If you want to make your app private, you must first delete any other private app in your workspace or make it public. +If you don't want your app to be indexed by search engines, you can make it private. Read [Share your app](/deploy/streamlit-community-cloud/share-your-app) to learn more about making your app private. Note: each workspace can only have one private app. If you want to make your app private, you must first delete any other private app in your workspace or make it public. That said, Streamlit Community Cloud is an open and free platform for the community to deploy, discover, and share Streamlit apps and code with each other. As such, we encourage you to make your app public so that it can be indexed by search engines and discovered by other Streamlit users and community members. diff --git a/content/streamlit-cloud/share-your-app/share-previews.md b/content/deploy/community-cloud/share-your-app/share-previews.md similarity index 93% rename from content/streamlit-cloud/share-your-app/share-previews.md rename to content/deploy/community-cloud/share-your-app/share-previews.md index bfb64b19c..f4d433aa6 100644 --- a/content/streamlit-cloud/share-your-app/share-previews.md +++ b/content/deploy/community-cloud/share-your-app/share-previews.md @@ -1,6 +1,6 @@ --- title: Share previews -slug: /streamlit-community-cloud/share-your-app/share-previews +slug: /deploy/streamlit-community-cloud/share-your-app/share-previews --- # Share previews @@ -25,7 +25,7 @@ The title is the text that appears at the top of the share preview. The text als There are two ways to set the title of a share preview: -1. Set the `page_title` parameter in [`st.set_page_config()`](/library/api-reference/utilities/st.set_page_config) to your desired title. E.g.: +1. Set the `page_title` parameter in [`st.set_page_config()`](/develop/api-reference/configuration/st.set_page_config) to your desired title. E.g.: ```python import streamlit as st diff --git a/content/streamlit-cloud/troubleshooting.md b/content/deploy/community-cloud/troubleshooting.md similarity index 87% rename from content/streamlit-cloud/troubleshooting.md rename to content/deploy/community-cloud/troubleshooting.md index b72c940c9..e40125e54 100644 --- a/content/streamlit-cloud/troubleshooting.md +++ b/content/deploy/community-cloud/troubleshooting.md @@ -1,6 +1,6 @@ --- title: Troubleshooting -slug: /streamlit-community-cloud/troubleshooting +slug: /deploy/streamlit-community-cloud/troubleshooting --- # Troubleshooting @@ -11,10 +11,10 @@ Sorry to hear you're having issues! Please take a look at some frequently asked 1. [General help](#general-help) 2. [Deploying apps](#deploying-apps) -3. [Sharing and accessing apps](/streamlit-community-cloud/troubleshooting#sharing-and-accessing-apps) -4. [Data and app security](/streamlit-community-cloud/troubleshooting#data-and-app-security) -5. [GitHub integration](/streamlit-community-cloud/troubleshooting#github-integration) -6. [Limitations and known issues](/streamlit-community-cloud/troubleshooting#limitations-and-known-issues) +3. [Sharing and accessing apps](/deploy/streamlit-community-cloud/troubleshooting#sharing-and-accessing-apps) +4. [Data and app security](/deploy/streamlit-community-cloud/troubleshooting#data-and-app-security) +5. [GitHub integration](/deploy/streamlit-community-cloud/troubleshooting#github-integration) +6. [Limitations and known issues](/deploy/streamlit-community-cloud/troubleshooting#limitations-and-known-issues) ## General help @@ -56,7 +56,7 @@ If you have really big or binary data that you change frequently, and git is fee ### My app is running into issues while deploying -Check your Cloud logs by clicking on the "Manage app" expander in the bottom right corner of your screen. Often the trouble is due to a dependency not being declared. See here for [more information on dependency management](/streamlit-community-cloud/deploy-your-app/app-dependencies). +Check your Cloud logs by clicking on the "Manage app" expander in the bottom right corner of your screen. Often the trouble is due to a dependency not being declared. See here for [more information on dependency management](/deploy/streamlit-community-cloud/deploy-your-app/app-dependencies). If that's not the issue, then please send the logs and warning you are seeing to our [Community forum](https://discuss.streamlit.io/) and we'll help get you sorted! @@ -67,7 +67,7 @@ If your app is running slowly or you're hitting the 'Argh' page, we first highly - [Common app problems: Resource limits](https://blog.streamlit.io/common-app-problems-resource-limits/) - [3 steps to fix app memory leaks](https://blog.streamlit.io/3-steps-to-fix-app-memory-leaks/) -If you're still having issues, click [here](/streamlit-community-cloud/manage-your-app#app-resources-and-limits) to learn more about resource limits. +If you're still having issues, click [here](/deploy/streamlit-community-cloud/manage-your-app#app-resources-and-limits) to learn more about resource limits. ### Can I get a custom URL for my app? @@ -75,11 +75,11 @@ Yes! You can find [instructions for setting a custom subdomain here](/knowledge- ## Sharing and accessing apps -Don't have SSO? No problem! You can sign in to Streamlit with your email address. [Click here](/streamlit-community-cloud/get-started#sign-in-with-email) for step-by-step instructions on how to sign in with email. \*/} +Don't have SSO? No problem! You can sign in to Streamlit with your email address. [Click here](/deploy/streamlit-community-cloud/get-started#sign-in-with-email) for step-by-step instructions on how to sign in with email. \*/} ### How do I add viewers to my Streamlit apps? -Viewer auth allows you to restrict the viewers of your private app. To access your app, users have to authenticate using an email-based passwordless login or Google OAuth. To learn more about how to share your public and private apps with viewers, click [here](/streamlit-community-cloud/share-your-app). +Viewer auth allows you to restrict the viewers of your private app. To access your app, users have to authenticate using an email-based passwordless login or Google OAuth. To learn more about how to share your public and private apps with viewers, click [here](/deploy/streamlit-community-cloud/share-your-app). ### Do viewers need access to the GitHub repo? @@ -90,7 +90,7 @@ Nope! You only need access to the GitHub repo if you want to push changes to the A 404 error is displayed to unauthorized viewers to avoid providing any unnecessary information about your app to unintended viewers. Users who satisfy any of the following conditions will see a 404 error when attempting to view your app after you have configured viewer auth: - User is not logged in with their primary identity. -- User is not included in the [list of allowed viewers](/streamlit-community-cloud/share-your-app#share-your-private-app) provided in the app settings. +- User is not included in the [list of allowed viewers](/deploy/streamlit-community-cloud/share-your-app#share-your-private-app) provided in the app settings. - User lacks read access to your app's GitHub repo. - User has read access to your app's GitHub repo but is not enrolled in Streamlit Community Cloud. @@ -109,7 +109,7 @@ If a user is still seeing a 404 error after their email address has been added t ### How will Streamlit secure my data? -Streamlit takes a number of industry best-practice measures to ensure your code, data, and apps are all secure. Read more in our [Trust and Security memo](/streamlit-community-cloud/get-started/trust-and-security). +Streamlit takes a number of industry best-practice measures to ensure your code, data, and apps are all secure. Read more in our [Trust and Security memo](/deploy/streamlit-community-cloud/get-started/trust-and-security). ### How do I set up SSO for my organization? diff --git a/content/deploy/concepts/_index.md b/content/deploy/concepts/_index.md new file mode 100644 index 000000000..ac0b5722a --- /dev/null +++ b/content/deploy/concepts/_index.md @@ -0,0 +1,29 @@ +--- +title: Deployment concepts +slug: /deploy/concepts +--- + +# Deployment concepts + +Learn the fundamental concepts of app deployment. There are three main processes involved in deploying apps. + +- Install Python, Streamlit, and other dependencies in your deployment environment. +- Securely handle your secrets and private information. +- Remote start your app (`streamlit run`). + +If you're using Streamlit Community Cloud, we'll do most of the work for you! + + + Understand the basics of configuring your deployment environment. + Understand the basics of secret management. + diff --git a/content/deploy/concepts/dependencies.md b/content/deploy/concepts/dependencies.md new file mode 100644 index 000000000..aca2e1f1c --- /dev/null +++ b/content/deploy/concepts/dependencies.md @@ -0,0 +1,55 @@ +--- +title: Managing dependencies when deploying your app +slug: /deploy/concepts/dependencies +--- + +# Managing dependencies when deploying your app + +Before you began developing your app, you set up and configured your development environment by installing Python and Streamlit. When you deploy your app, you need to set up and configure your deployment environment in the same way. When you deploy your app to a cloud service, your app's [Python server](/develop/concepts/architecture/architecture#python-backend-server) will be running on a remote machine. This remote machine will not have access all the files and programs on your personal computer. + +All Streamlit apps have at least two dependencies: Python and Streamlit. Your app may have additional dependencies in the form of Python packages or software that must be installed to properly execute your script. If you are using a service like Streamlit Community Cloud which is designed for Streamlit apps, we'll take care of Python and Streamlit for you! + +## Install Python and other software + +If you are using Streamlit Community Cloud, Python is already installed. You can just pick the version in the deployment dialog. If you need to install Python yourself or you have other non-Python software to install, follow your platform's instructions to install additional software. You will commonly use a package management tool to do this. +For example, Streamlit Community Cloud uses Advanced Package Tool (`apt`) for Debian-based Linux systems. For more information about installing non-Python depencies on Streamlit Community Cloud, see [`apt-get` dependencies](/deploy/streamlit-community-cloud/deploy-your-app/app-dependencies#apt-get-dependencies). + +## Install Python packages + +Once you have Python installed in your deployment environment, you'll need to install all the necessary Python packages, including Streamlit! With each `import` of an installed package, you add a Python dependency to your script. You need to install those dependencies in your deployment environment through a Python package manager. + +If you are using Streamlit Community Cloud, you'll have the latest version of Streamlit and all of its dependencies installed by default. So, if you're making a simple app and don't need additional dependencies, you won't have to do anything at all! + +### `pip` and `requirements.txt` + +Since `pip` comes by default with Python, the most common way to configure your Python environment is with a `requirements.txt` file. Each line of a `requirements.txt` file is a package to `pip install`. You should _not_ include built-in Python libraries like `math` or `random` in your `requirements.txt` file. These are a part of Python and aren't installed separately. + +If you have a script like the following, you would only need to install Streamlit. No extra dependencies would be needed since `pandas` and `numpy` are installed as direct dependencies of `streamlit`. Similarly, `math` and `random` are built into Python. + +```python +import streamlit as st +import pandas as pd +import numpy as np +import math +import random + +st.write('Hi!') +``` + +However, it's a best practice accurately record packages you use, so the recommended `requirements.txt` file would be: + +```none +streamlit +pandas +numpy +``` + +If you needed to specify certain versions, another valid example would be: + +```none +streamlit==1.24.1 +pandas>2.0 +numpy<=1.25.1 +``` + +A `requirements.txt` file is commonly saved in the root of your repository or file directory. If you are using Streamlit Community Cloud, see [Add Python dependencies](/deploy/streamlit-community-cloud/deploy-your-app/app-dependencies#add-python-dependencies) for more information. Otherwise, check your platform's documentation. diff --git a/content/deploy/concepts/secrets.md b/content/deploy/concepts/secrets.md new file mode 100644 index 000000000..1b4d3a3c1 --- /dev/null +++ b/content/deploy/concepts/secrets.md @@ -0,0 +1,14 @@ +--- +title: Managing secrets when deploying your app +slug: /deploy/concepts/secrets +--- + +# Managing secrets when deploying your app + +If you are connecting to data sources or external services, you will likely be handling secret information like credentials or keys. Secret information should be stored and transmitted in a secure manner. When you deploy your app, ensure that you understand your platform's features and mechanisms for handling secrets so you can follow best practice. + +Avoid saving secrets directly in your code and keep `.gitignore` updated to prevent accidentally committing a local secret to your repository. For helpful reminders, see [Security reminders](/develop/concepts/connections/security-reminders). + +If you are using Streamlit Community Cloud, [Secrets management](/deploy/streamlit-community-cloud/deploy-your-app/secrets-management) allows you save environment variables and store secrets outside of your code. If you are using another platform designed for Streamlit, check if they have a built-in mechanism for working with secrets. In some cases, they may even support `st.secrets` or securely uploading your `secrets.toml` file. + +For information about using `st.connection` with environment variables, see [Global secrets, managing multiple apps and multiple data stores](/develop/concepts/connections/connecting-to-data#global-secrets-managing-multiple-apps-and-multiple-data-stores). diff --git a/content/kb/tutorials/deploy/index.md b/content/deploy/tutorials/_index.md similarity index 86% rename from content/kb/tutorials/deploy/index.md rename to content/deploy/tutorials/_index.md index 7e7fac0d1..fc698d394 100644 --- a/content/kb/tutorials/deploy/index.md +++ b/content/deploy/tutorials/_index.md @@ -1,14 +1,14 @@ --- -title: Deploy Streamlit apps -slug: /knowledge-base/tutorials/deploy +title: Deployment tutorials +slug: /deploy/tutorials --- -# Deploy Streamlit apps +# Deployment tutorials This sections contains step-by-step guides on how to deploy Streamlit apps to various cloud platforms and services. We have deployment guides for: - + screenshot @@ -16,7 +16,7 @@ This sections contains step-by-step guides on how to deploy Streamlit apps to va - + screenshot @@ -24,7 +24,7 @@ This sections contains step-by-step guides on how to deploy Streamlit apps to va - + screenshot diff --git a/content/kb/tutorials/deploy/docker.md b/content/deploy/tutorials/docker.md similarity index 96% rename from content/kb/tutorials/deploy/docker.md rename to content/deploy/tutorials/docker.md index ba184a534..0758a6763 100644 --- a/content/kb/tutorials/deploy/docker.md +++ b/content/deploy/tutorials/docker.md @@ -1,6 +1,6 @@ --- title: Deploy Streamlit using Docker -slug: /knowledge-base/tutorials/deploy/docker +slug: /deploy/tutorials/docker --- # Deploy Streamlit using Docker @@ -12,7 +12,7 @@ So you have an amazing app and you want to start sharing it with other people, w - **On your corporate network** - Most corporate networks are closed to the outside world. You typically use a VPN to log onto your corporate network and access resources there. You could run your Streamlit app on a server in your corporate network for security reasons, to ensure that only folks internal to your company can access it. - **On the cloud** - If you'd like to access your Streamlit app from outside of a corporate network, or share your app with folks outside of your home network or laptop, you might choose this option. In this case, it'll depend on your hosting provider. We have [community-submitted guides](/knowledge-base/deploy/deploy-streamlit-heroku-aws-google-cloud) from Heroku, AWS, and other providers. -Wherever you decide to deploy your app, you will first need to containerize it. This guide walks you through using Docker to deploy your app. If you prefer Kubernetes see [Deploy Streamlit using Kubernetes](/knowledge-base/tutorials/deploy/kubernetes). +Wherever you decide to deploy your app, you will first need to containerize it. This guide walks you through using Docker to deploy your app. If you prefer Kubernetes see [Deploy Streamlit using Kubernetes](/deploy/tutorials/kubernetes). ## Prerequisites @@ -131,7 +131,7 @@ Let’s walk through each line of the Dockerfile : - streamlit_app.py ``` - where `requirements.txt` file contains all your [Python dependencies](https://docs.streamlit.io/streamlit-community-cloud/deploy-your-app/app-dependencies#add-python-dependencies). E.g + where `requirements.txt` file contains all your [Python dependencies](/deploy/streamlit-community-cloud/deploy-your-app/app-dependencies#add-python-dependencies). E.g ``` altair @@ -191,7 +191,7 @@ Let’s walk through each line of the Dockerfile : More generally, the idea is copy your app code from wherever it may live on your server into the container. If the code is not in the same directory as the Dockerfile, modify the above command to include the path to the code. -5. Install your app’s [Python dependencies](/streamlit-community-cloud/deploy-your-app/app-dependencies#add-python-dependencies) from the cloned `requirements.txt` in the container: +5. Install your app’s [Python dependencies](/deploy/streamlit-community-cloud/deploy-your-app/app-dependencies#add-python-dependencies) from the cloned `requirements.txt` in the container: ```docker RUN pip3 install -r requirements.txt diff --git a/content/kb/tutorials/deploy/kubernetes.md b/content/deploy/tutorials/kubernetes.md similarity index 99% rename from content/kb/tutorials/deploy/kubernetes.md rename to content/deploy/tutorials/kubernetes.md index d2c7109c6..8c347dc39 100644 --- a/content/kb/tutorials/deploy/kubernetes.md +++ b/content/deploy/tutorials/kubernetes.md @@ -1,6 +1,6 @@ --- title: Deploy Streamlit using Kubernetes -slug: /knowledge-base/tutorials/deploy/kubernetes +slug: /deploy/tutorials/kubernetes --- # Deploy Streamlit using Kubernetes @@ -12,7 +12,7 @@ So you have an amazing app and you want to start sharing it with other people, w - **On your corporate network** - Most corporate networks are closed to the outside world. You typically use a VPN to log onto your corporate network and access resources there. You could run your Streamlit app on a server in your corporate network for security reasons, to ensure that only folks internal to your company can access it. - **On the cloud** - If you'd like to access your Streamlit app from outside of a corporate network, or share your app with folks outside of your home network or laptop, you might choose this option. In this case, it'll depend on your hosting provider. We have [community-submitted guides](/knowledge-base/deploy/deploy-streamlit-heroku-aws-google-cloud) from Heroku, AWS, and other providers. -Wherever you decide to deploy your app, you will first need to containerize it. This guide walks you through using Kubernetes to deploy your app. If you prefer Docker see [Deploy Streamlit using Docker](/knowledge-base/tutorials/deploy/docker). +Wherever you decide to deploy your app, you will first need to containerize it. This guide walks you through using Kubernetes to deploy your app. If you prefer Docker see [Deploy Streamlit using Docker](/deploy/tutorials/docker). ## Prerequisites diff --git a/content/develop/_index.md b/content/develop/_index.md new file mode 100644 index 000000000..f8d342e41 --- /dev/null +++ b/content/develop/_index.md @@ -0,0 +1,35 @@ +--- +title: Develop +slug: /develop +--- + +# Develop + +Get all the information you need to build beautiful, performant web apps with Streamlit! + + + Learn how Streamlit works with in-depth guides to our execution model and features. + Learn about our API with function definitions and examples. + Follow step-by-step instructions to build example apps and useful snippets. + Check out our quick references for easy access to convenient information like our changelog, cheat sheet, pre-release features, and roadmap. + diff --git a/content/library/api/api-reference.md b/content/develop/api-reference/_index.md similarity index 82% rename from content/library/api/api-reference.md rename to content/develop/api-reference/_index.md index 529fb0642..9c598ed49 100644 --- a/content/library/api/api-reference.md +++ b/content/develop/api-reference/_index.md @@ -1,8 +1,6 @@ --- title: API Reference -slug: /library/api-reference -next: caching -previous: index.md +slug: /develop/api-reference --- # API reference @@ -16,8 +14,13 @@ Browse our API below and click to learn more about any of our available commands ## Display almost anything +### Write and magic + +
    + - + +

    st.write

    @@ -30,7 +33,7 @@ st.write(my_mpl_figure) ```
    - +

    st.write_stream

    @@ -42,7 +45,7 @@ st.write_stream(my_llm_stream) ```
    - +

    Magic

    @@ -57,10 +60,12 @@ my_mpl_figure
    -## Text elements +### Text elements + +
    - + screenshot @@ -73,7 +78,7 @@ st.markdown("Hello **world**!") ``` - + screenshot @@ -86,7 +91,7 @@ st.title("The app title") ``` - + screenshot @@ -99,7 +104,7 @@ st.header("This is a header") ``` - + screenshot @@ -112,7 +117,7 @@ st.subheader("This is a subheader") ``` - + screenshot @@ -125,7 +130,7 @@ st.caption("This is written small caption text") ``` - + screenshot @@ -138,20 +143,21 @@ st.code("a = 1234") ``` - + -screenshot +screenshot -

    Preformatted text

    +

    Echo

    -Write fixed-width and preformatted text. +Display some code in the app, then execute it. Useful for tutorials. ```python -st.text("Hello world") +with st.echo(): + st.write('This code will be printed') ```
    - + screenshot @@ -164,7 +170,20 @@ st.latex("\int a x^2 \,dx") ``` - + + +screenshot + +

    Preformatted text

    + +Write fixed-width and preformatted text. + +```python +st.text("Hello world") +``` + +
    + screenshot @@ -251,10 +270,12 @@ mention(label="An awesome Streamlit App", icon="streamlit", url="https://extras -## Data elements +### Data elements + +
    - + screenshot

    Dataframes

    @@ -266,7 +287,7 @@ st.dataframe(my_data_frame) ```
    - + screenshot @@ -279,7 +300,7 @@ edited = st.data_editor(df, num_rows="dynamic") ``` - + screenshot @@ -293,7 +314,7 @@ st.column_config.NumberColumn("Price (in USD)", min_value=0, format="$%d") - + screenshot

    Static tables

    @@ -305,7 +326,7 @@ st.table(my_data_frame) ```
    - + screenshot

    Metrics

    @@ -317,7 +338,7 @@ st.metric("My metric", 42, 2) ```
    - + screenshot

    Dicts and JSON

    @@ -437,11 +458,13 @@ style_metric_cards() -## Chart elements +### Chart elements + +
    - + screenshot

    Simple area charts

    @@ -453,7 +476,7 @@ st.area_chart(my_data_frame) ```
    - + screenshot

    Simple bar charts

    @@ -465,7 +488,7 @@ st.bar_chart(my_data_frame) ```
    - + screenshot

    Simple line charts

    @@ -477,7 +500,7 @@ st.line_chart(my_data_frame) ```
    - + screenshot

    Simple scatter charts

    @@ -489,7 +512,7 @@ st.scatter_chart(my_data_frame) ```
    - + screenshot

    Scatterplots on maps

    @@ -501,7 +524,7 @@ st.map(my_data_frame) ```
    - + screenshot

    Matplotlib

    @@ -513,7 +536,7 @@ st.pyplot(my_mpl_figure) ```
    - + screenshot

    Altair

    @@ -525,7 +548,7 @@ st.altair_chart(my_altair_chart) ```
    - + screenshot

    Vega-Lite

    @@ -537,7 +560,7 @@ st.vega_lite_chart(my_vega_lite_chart) ```
    - + screenshot

    Plotly

    @@ -549,7 +572,7 @@ st.plotly_chart(my_plotly_chart) ```
    - + screenshot

    Bokeh

    @@ -561,7 +584,7 @@ st.bokeh_chart(my_bokeh_chart) ```
    - + screenshot

    PyDeck

    @@ -573,7 +596,7 @@ st.pydeck_chart(my_pydeck_chart) ```
    - + screenshot

    GraphViz

    @@ -726,10 +749,12 @@ st.altair_chart(chart, use_container_width=True) -## Input widgets +### Input widgets + +
    - + screenshot @@ -742,33 +767,33 @@ clicked = st.button("Click me") ``` - + -screenshot +screenshot -

    Data editor

    +

    Download button

    -Display a data editor widget. +Display a download button widget. ```python -edited = st.experimental_data_editor(df, num_rows="dynamic") +st.download_button("Download file", file) ```
    - + -screenshot +screenshot -

    Download button

    +

    Form button

    -Display a download button widget. +Display a form submit button. For use with `st.form`. ```python -st.download_button("Download file", file) +st.form_submit_button("Sign up") ```
    - + screenshot @@ -781,7 +806,7 @@ st.link_button("Go to gallery", url) ``` - + screenshot @@ -795,7 +820,7 @@ st.page_link("pages/profile.py", label="My profile") ``` - + screenshot @@ -808,20 +833,33 @@ selected = st.checkbox("I agree") ``` - + -screenshot +screenshot -

    Toggle

    +

    Color picker

    -Display a toggle widget. +Display a color picker widget. ```python -activated = st.toggle("Activate") +color = st.color_picker("Pick a color") ```
    - + + +screenshot + +

    Multiselect

    + +Display a multiselect widget. The multiselect widget starts as empty. + +```python +choices = st.multiselect("Buy", ["milk", "apples", "potatoes"]) +``` + +
    + screenshot @@ -834,7 +872,7 @@ choice = st.radio("Pick one", ["cats", "dogs"]) ``` - + screenshot @@ -847,20 +885,46 @@ choice = st.selectbox("Pick one", ["cats", "dogs"]) ``` - + -screenshot +screenshot -

    Multiselect

    +

    Select-slider

    -Display a multiselect widget. The multiselect widget starts as empty. +Display a slider widget to select items from a list. ```python -choices = st.multiselect("Buy", ["milk", "apples", "potatoes"]) +size = st.select_slider("Pick a size", ["S", "M", "L"]) ```
    - + + +screenshot + +

    Toggle

    + +Display a toggle widget. + +```python +activated = st.toggle("Activate") +``` + +
    + + +screenshot + +

    Number input

    + +Display a numeric input widget. + +```python +choice = st.number_input("Pick a number", 0, 10) +``` + +
    + screenshot @@ -873,46 +937,48 @@ number = st.slider("Pick a number", 0, 100) ``` - + -screenshot +screenshot -

    Select-slider

    +

    Date input

    -Display a slider widget to select items from a list. +Display a date input widget. ```python -size = st.select_slider("Pick a size", ["S", "M", "L"]) +date = st.date_input("Your birthday") ```
    - + -screenshot +screenshot -

    Text input

    +

    Time input

    -Display a single-line text input widget. +Display a time input widget. ```python -name = st.text_input("First name") +time = st.time_input("Meeting time") ```
    - + -screenshot +screenshot -

    Number input

    +

    Chat input

    -Display a numeric input widget. +Display a chat input widget. ```python -choice = st.number_input("Pick a number", 0, 10) +prompt = st.chat_input("Say something") +if prompt: + st.write(f"The user has sent: {prompt}") ```
    - + screenshot @@ -925,33 +991,33 @@ text = st.text_area("Text to translate") ``` - + -screenshot +screenshot -

    Date input

    +

    Text input

    -Display a date input widget. +Display a single-line text input widget. ```python -date = st.date_input("Your birthday") +name = st.text_input("First name") ```
    - + -screenshot +screenshot -

    Time input

    +

    Data editor

    -Display a time input widget. +Display a data editor widget. ```python -time = st.time_input("Meeting time") +edited = st.experimental_data_editor(df, num_rows="dynamic") ```
    - + screenshot @@ -964,7 +1030,7 @@ data = st.file_uploader("Upload a CSV") ``` - + screenshot @@ -976,19 +1042,6 @@ Display a widget that allows users to upload images directly from a camera. image = st.camera_input("Take a picture") ``` - - - -screenshot - -

    Color picker

    - -Display a color picker widget. - -```python -color = st.color_picker("Pick a color") -``` -
    @@ -1149,10 +1202,12 @@ stoggle( -## Media elements +### Media elements + +
    - + screenshot @@ -1168,7 +1223,7 @@ st.image("https://example.com/myimage.jpg") ``` - + screenshot @@ -1184,7 +1239,7 @@ st.audio("https://example.com/myaudio.mp3", format="audio/mp3") ``` - + screenshot @@ -1302,10 +1357,12 @@ st_lottie(lottie_hello, key="hello") -## Layouts and containers +### Layouts and containers + +
    - + screenshot @@ -1320,7 +1377,7 @@ col2.write("this is column 2") ``` - + screenshot @@ -1336,7 +1393,7 @@ c.write("This will show second") ``` - + screenshot @@ -1352,7 +1409,7 @@ c.write("This will show first") ``` - + screenshot @@ -1366,7 +1423,7 @@ with st.expander("Open to see more"): ``` - + screenshot @@ -1380,7 +1437,7 @@ with st.popover("Settings"): ``` - + screenshot @@ -1394,7 +1451,7 @@ st.sidebar.button("Click me!") ``` - + screenshot @@ -1466,14 +1523,16 @@ show_pages([ Page("streamlit_app.py", "Home", "🏠"), -## Chat elements +### Chat elements + +
    Streamlit provides a few commands to help you build conversational apps. These chat elements are designed to be used in conjunction with each other, but you can also use them separately. `st.chat_message` lets you insert a chat message container into the app so you can display messages from the user or the app. Chat containers can contain other Streamlit elements, including charts, tables, text, and more. `st.chat_input` lets you display a chat input widget so the user can type in a message. - + screenshot @@ -1488,7 +1547,7 @@ if prompt: ``` - + screenshot @@ -1504,7 +1563,7 @@ with st.chat_message("user"): ``` - + screenshot @@ -1518,7 +1577,7 @@ with st.status('Running'): ``` - +

    st.write_stream

    @@ -1532,10 +1591,12 @@ st.write_stream(my_llm_stream)
    -## Display progress and status +### Status elements + +
    - + screenshot @@ -1550,7 +1611,7 @@ for i in range(101): ``` - + screenshot @@ -1564,7 +1625,7 @@ with st.spinner("Please wait..."): ``` - + screenshot @@ -1578,7 +1639,7 @@ with st.status('Running'): ``` - + screenshot @@ -1591,7 +1652,7 @@ st.toast('Butter!', icon='🧈') ``` - + screenshot @@ -1607,7 +1668,7 @@ st.balloons() ``` - + screenshot @@ -1623,59 +1684,59 @@ st.snow() ``` - + -screenshot +screenshot -

    Error box

    +

    Success box

    -Display error message. +Display a success message. ```python -st.error("We encountered an error") +st.success("Match found!") ```
    - + -screenshot +screenshot -

    Warning box

    +

    Info box

    -Display warning message. +Display an informational message. ```python -st.warning("Unable to fetch image. Skipping...") +st.info("Dataset is updated every day at midnight.") ```
    - + -screenshot +screenshot -

    Info box

    +

    Warning box

    -Display an informational message. +Display warning message. ```python -st.info("Dataset is updated every day at midnight.") +st.warning("Unable to fetch image. Skipping...") ```
    - + -screenshot +screenshot -

    Success box

    +

    Error box

    -Display a success message. +Display error message. ```python -st.success("Match found!") +st.error("We encountered an error") ```
    - + screenshot @@ -1747,10 +1808,49 @@ rain(emoji="🎈", font_size=54, -## Control flow +## App logic and configuration + +### Navigation and pages + +
    - + + + +

    Switch page

    + +Programmatically navigates to a specified page. + +```python +st.switch_page("pages/my_page.py") +``` + +
    + + + +screenshot + +

    Page link

    + +Display a link to another page in a multipage app. + +```python +st.page_link("app.py", label="Home", icon="🏠") +st.page_link("pages/profile.py", label="My profile") +``` + +
    + +
    + +### Execution flow + +
    + + +

    Forms

    @@ -1764,7 +1864,7 @@ with st.form(key='my_form'): ```
    - +

    Rerun script

    @@ -1775,7 +1875,7 @@ st.rerun() ```
    - +

    Stop execution

    @@ -1785,17 +1885,6 @@ Stops execution immediately. st.stop() ``` -
    - - -

    Switch page

    - -Programmatically navigates to a specified page. - -```python -st.switch_page("pages/my_page.py") -``` -
    @@ -1854,152 +1943,176 @@ show_pages([ Page("streamlit_app.py", "Home", "🏠"), -## Developer tools +### Caching and state - - - +
    -screenshot + + -

    Pandas Profiling

    +

    Cache data

    -Pandas profiling component for Streamlit. Created by [@okld](https://github.com/okld/). +Function decorator to cache functions that return data (e.g. dataframe transforms, database queries, ML inference). ```python -df = pd.read_csv("https://storage.googleapis.com/tf-datasets/titanic/train.csv") -pr = df.profile_report() - -st_profile_report(pr) +@st.cache_data +def long_function(param1, param2): + # Perform expensive computation here or + # fetch data from the web here + return data ``` -
    - - +
    -screenshot + -

    Streamlit Ace

    +

    Cache resource

    -Ace editor component for Streamlit. Created by [@okld](https://github.com/okld). +Function decorator to cache functions that return global resources (e.g. database connections, ML models). ```python -from streamlit_ace import st_ace - -content = st_ace() -content +@st.cache_resource +def init_model(): + # Return a global resource here + return pipeline( + "sentiment-analysis", + model="distilbert-base-uncased-finetuned-sst-2-english" + ) ``` - - - +
    -screenshot + -

    Streamlit Analytics

    +

    Session state

    -Track & visualize user interactions with your streamlit app. Created by [@jrieke](https://github.com/jrieke). +Session state is a way to share variables between reruns, for each user session. ```python -import streamlit_analytics +st.session_state['key'] = value +``` -with streamlit_analytics.track(): - st.text_input("Write something") +
    + + + +

    Query parameters

    + +Get, set, or clear the query parameters that are shown in the browser's URL bar. + +```python +st.query_params[key] = value +st.query_params.clear() ``` - +
    - +
    + +### Connections and databases -## Utilities +#### Setup your connection - + -

    Set page title, favicon, and more

    +screenshot -Configures the default settings of the page. +

    Create a connection

    + +Connect to a data source or API ```python -st.set_page_config( - page_title="My app", - page_icon=":shark:", -) +conn = st.connection('pets_db', type='sql') +pet_owners = conn.query('select * from pet_owners') +st.dataframe(pet_owners) ```
    - +
    -

    Echo

    +#### Built-in connections -Display some code on the app, then execute it. Useful for tutorials. + -```python -with st.echo(): - st.write('This code will be printed') -``` + - - +screenshot -

    Get help

    +

    SnowflakeConnection

    -Display object’s doc string, nicely formatted. +A connection to Snowflake. ```python -st.help(st.write) -st.help(pd.DataFrame) +conn = st.connection('snowflake') ```
    - -

    Query parameters

    + -Get, set, or clear the query parameters that are shown in the browser's URL bar. +screenshot + +

    SQLConnection

    + +A connection to a SQL database using SQLAlchemy. ```python -st.query_params[key] = value -st.query_params.clear() +conn = st.connection('sql') ```
    -## Mutate charts +#### Build your own connections - + -

    Add rows

    +

    Connection base class

    -Append a dataframe to the bottom of the current one in certain elements, for optimized data updates. +Build your own connection with `BaseConnection`. ```python -element = st.line_chart(df) -element.add_rows(df_with_extra_rows) +class MyConnection(BaseConnection[myconn.MyConnection]): + def _connect(self, **kwargs) -> MyConnection: + return myconn.connect(**self._secrets, **kwargs) + def query(self, query): + return self._instance.query(query) ```
    +
    -## State management +#### Secrets management - -

    Session state

    + -Session state is a way to share variables between reruns, for each user session. +

    Secrets singleton

    + +Access secrets from a local TOML file. ```python -st.session_state['key'] = value +key = st.secrets["OpenAI_key"] +``` + +
    + + +

    Secrets file

    + +Save your secrets in a per-project or per-profile TOML file. + +```python +OpenAI_key = "" ```
    -
    -## Connections and databases +
    @@ -2056,145 +2169,134 @@ st.write(user_info) -## Performance +### Custom Components + +
    - -

    Cache data

    + -Function decorator to cache functions that return data (e.g. dataframe transforms, database queries, ML inference). +

    Declare a component

    + +Create and register a custom component. ```python -@st.cache_data -def long_function(param1, param2): - # Perform expensive computation here or - # fetch data from the web here - return data +st.components.v1.declare_component( + "custom_slider", + "/frontend", +) ```
    - + -

    Cache resource

    +

    HTML

    -Function decorator to cache functions that return global resources (e.g. database connections, ML models). +Display an HTML string in an iframe. ```python -@st.cache_resource -def init_model(): - # Return a global resource here - return pipeline( - "sentiment-analysis", - model="distilbert-base-uncased-finetuned-sst-2-english" - ) +st.components.v1.html( + "

    Foo bar.

    " +) ```
    -
    - -## Connections and databases - -### Setup your connection - - - - -screenshot + -

    Create a connection

    +

    iframe

    -Connect to a data source or API +Load a remote URL in an iframe. ```python -conn = st.connection('pets_db', type='sql') -pet_owners = conn.query('select * from pet_owners') -st.dataframe(pet_owners) +st.components.v1.iframe( + "docs.streamlit.io" +) ```
    +
    -### Built-in connections +### Utilities and data - +
    - - -screenshot + + -

    SnowflakeConnection

    +

    User info

    -A connection to Snowflake. +`st.experimental_user` returns information about the logged-in user of private apps on Streamlit Community Cloud. ```python -conn = st.connection('snowflake') +if st.experimental_user.email == "foo@corp.com": + st.write("Welcome back, ", st.experimental_user.email) +else: + st.write("You are not authorized to view this page.") ```
    + - - -screenshot - -

    SQLConnection

    +

    Get help

    -A connection to a SQL database using SQLAlchemy. +Display object’s doc string, nicely formatted. ```python -conn = st.connection('sql') +st.help(st.write) +st.help(pd.DataFrame) ```
    -### Third-party connections +### Configuration + +
    - + -

    Connection base class

    +

    Configuration file

    -Build your own connection with `BaseConnection`. +Configures the default settings for your app. -```python -class MyConnection(BaseConnection[myconn.MyConnection]): - def _connect(self, **kwargs) -> MyConnection: - return myconn.connect(**self._secrets, **kwargs) - def query(self, query): - return self._instance.query(query) +``` +your-project/ +├── .streamlit/ +│ └── config.toml +└── your_app.py ```
    + -
    - -## Personalization - - - - -

    User info

    +

    Set page title, favicon, and more

    -`st.experimental_user` returns information about the logged-in user of private apps on Streamlit Community Cloud. +Configures the default settings of the page. ```python -if st.experimental_user.email == "foo@corp.com": - st.write("Welcome back, ", st.experimental_user.email) -else: - st.write("You are not authorized to view this page.") +st.set_page_config( + page_title="My app", + page_icon=":shark:", +) ```
    -## App testing +## Developer tools + +### App testing + +
    - +

    st.testing.v1.AppTest

    @@ -2214,7 +2316,7 @@ assert at.warning[0].value == "Try again."
    - +

    AppTest.from_file

    @@ -2229,7 +2331,7 @@ at.run()
    - +

    AppTest.from_string

    @@ -2244,7 +2346,7 @@ at.run()
    - +

    AppTest.from_function

    @@ -2259,7 +2361,7 @@ at.run()
    - +

    Block

    @@ -2279,7 +2381,7 @@ assert not at.exception
    - +

    Element

    @@ -2298,7 +2400,7 @@ assert at.title[0].value == "My awesome app"
    - +

    Button

    @@ -2310,7 +2412,7 @@ at.button[0].click().run()
    - +

    ChatInput

    @@ -2322,7 +2424,7 @@ at.chat_input[0].set_value("What is Streamlit?").run()
    - +

    Checkbox

    @@ -2334,7 +2436,7 @@ at.checkbox[0].check().run()
    - +

    ColorPicker

    @@ -2346,7 +2448,7 @@ at.color_picker[0].pick("#FF4B4B").run()
    - +

    DateInput

    @@ -2359,7 +2461,7 @@ at.date_input[0].set_value(release_date).run()
    - +

    Multiselect

    @@ -2371,7 +2473,7 @@ at.multiselect[0].select("New York").run()
    - +

    NumberInput

    @@ -2383,7 +2485,7 @@ at.number_input[0].increment().run()
    - +

    Radio

    @@ -2395,7 +2497,7 @@ at.radio[0].set_value("New York").run()
    - +

    SelectSlider

    @@ -2407,7 +2509,7 @@ at.select_slider[0].set_range("A","C").run()
    - +

    Selectbox

    @@ -2419,7 +2521,7 @@ at.selectbox[0].select("New York").run()
    - +

    Slider

    @@ -2431,7 +2533,7 @@ at.slider[0].set_range(2,5).run()
    - +

    TextArea

    @@ -2443,7 +2545,7 @@ at.text_area[0].input("Streamlit is awesome!").run()
    - +

    TextInput

    @@ -2455,7 +2557,7 @@ at.text_input[0].input("Streamlit").run()
    - +

    TimeInput

    @@ -2467,7 +2569,7 @@ at.time_input[0].increment().run()
    - +

    Toggle

    @@ -2480,3 +2582,58 @@ at.toggle[0].set_value("True").run()
    + + + + + +screenshot + +

    Pandas Profiling

    + +Pandas profiling component for Streamlit. Created by [@okld](https://github.com/okld/). + +```python +df = pd.read_csv("https://storage.googleapis.com/tf-datasets/titanic/train.csv") +pr = df.profile_report() + +st_profile_report(pr) +``` + +
    + + + +screenshot + +

    Streamlit Ace

    + +Ace editor component for Streamlit. Created by [@okld](https://github.com/okld). + +```python +from streamlit_ace import st_ace + +content = st_ace() +content +``` + +
    + + + +screenshot + +

    Streamlit Analytics

    + +Track & visualize user interactions with your streamlit app. Created by [@jrieke](https://github.com/jrieke). + +```python +import streamlit_analytics + +with streamlit_analytics.track(): + st.text_input("Write something") +``` + +
    + +
    diff --git a/content/develop/api-reference/caching-and-state/_index.md b/content/develop/api-reference/caching-and-state/_index.md new file mode 100644 index 000000000..99ea9ecbe --- /dev/null +++ b/content/develop/api-reference/caching-and-state/_index.md @@ -0,0 +1,161 @@ +--- +title: Caching and state +slug: /develop/api-reference/caching-and-state +--- + +# Caching and state + +Optimize performance and add statefulness to your app! + +## Caching + +Streamlit provides powerful [cache primitives](/develop/concepts/architecture/caching) for data and global resources. They allow your app to stay performant even when loading data from the web, manipulating large datasets, or performing expensive computations. + + + + + +

    Cache data

    + +Function decorator to cache functions that return data (e.g. dataframe transforms, database queries, ML inference). + +```python +@st.cache_data +def long_function(param1, param2): + # Perform expensive computation here or + # fetch data from the web here + return data +``` + +
    + + + +

    Cache resource

    + +Function decorator to cache functions that return global resources (e.g. database connections, ML models). + +```python +@st.cache_resource +def init_model(): + # Return a global resource here + return pipeline( + "sentiment-analysis", + model="distilbert-base-uncased-finetuned-sst-2-english" + ) +``` + +
    + +
    + +## Manage state + +Streamlit re-executes your script with each user interaction. Widgets have built-in statefulness between reruns, but Session State lets you do more! + + + + +

    Session State

    + +Save data between reruns and across pages. + +```python +st.session_state["foo"] = "bar" +``` + +
    + + +

    Query parameters

    + +Get, set, or clear the query parameters that are shown in the browser's URL bar. + +```python +st.query_params[key] = value +st.query_params.clear() +``` + +
    + +
    + +## Deprecated commands + + + + + +> This command was deprecated in version 1.18.0. Use `st.cache_data` or `st.cache_resource` instead. + +

    Caching

    + +Function decorator to memoize function executions. + +```python +@st.cache(ttl=3600) +def run_long_computation(arg1, arg2): + # Do stuff here + return computation_output +``` + +
    + + + +> This command was deprecated in version 1.18.0. Use `st.cache_data` instead. + +

    Memo

    + +Experimental function decorator to memoize function executions. + +```python +@st.experimental_memo +def fetch_and_clean_data(url): + # Fetch data from URL here, and then clean it up. + return data +``` + +
    + + + +> This command was deprecated in version 1.18.0. Use `st.cache_resource` instead. + +

    Singleton

    + +Experimental function decorator to store singleton objects. + +```python +@st.experimental_singleton +def get_database_session(url): + # Create a database session object that points to the URL. + return session +``` + +
    + + +

    Get query parameters

    + +Get query parameters that are shown in the browser's URL bar. + +```python +param_dict = st.experimental_get_query_params() +``` + +
    + + +

    Set query parameters

    + +Set query parameters that are shown in the browser's URL bar. + +```python +st.experimental_set_query_params( + {"show_all"=True, "selected"=["asia", "america"]} +) +``` + +
    +
    diff --git a/content/library/api/performance/cache-data.md b/content/develop/api-reference/caching-and-state/cache-data.md similarity index 92% rename from content/library/api/performance/cache-data.md rename to content/develop/api-reference/caching-and-state/cache-data.md index 81fa0089f..0139bdab1 100644 --- a/content/library/api/performance/cache-data.md +++ b/content/develop/api-reference/caching-and-state/cache-data.md @@ -1,16 +1,16 @@ --- title: st.cache_data -slug: /library/api-reference/performance/st.cache_data +slug: /develop/api-reference/caching-and-state/st.cache_data description: st.cache_data is used to cache functions that return data (e.g. dataframe transforms, database queries, ML inference). --- -This page only contains information on the `st.cache_data` API. For a deeper dive into caching and how to use it, check out [Caching](/library/advanced-features/caching). +This page only contains information on the `st.cache_data` API. For a deeper dive into caching and how to use it, check out [Caching](/develop/concepts/architecture/caching). - + @@ -18,7 +18,7 @@ This page only contains information on the `st.cache_data` API. For a deeper div - + #### Example @@ -73,7 +73,7 @@ def show_data(): ### Input widgets -You can also use [interactive input widgets](/library/api-reference/widgets) like `st.slider` or `st.text_input` in cached functions. Widget replay is an experimental feature at the moment. To enable it, you need to set the `experimental_allow_widgets` parameter: +You can also use [interactive input widgets](/develop/api-reference/widgets) like `st.slider` or `st.text_input` in cached functions. Widget replay is an experimental feature at the moment. To enable it, you need to set the `experimental_allow_widgets` parameter: ```python @st.cache_data(experimental_allow_widgets=True) # 👈 Set the parameter diff --git a/content/library/api/performance/cache-resource.md b/content/develop/api-reference/caching-and-state/cache-resource.md similarity index 91% rename from content/library/api/performance/cache-resource.md rename to content/develop/api-reference/caching-and-state/cache-resource.md index 82655f103..7fc46bdee 100644 --- a/content/library/api/performance/cache-resource.md +++ b/content/develop/api-reference/caching-and-state/cache-resource.md @@ -1,18 +1,18 @@ --- title: st.cache_resource -slug: /library/api-reference/performance/st.cache_resource +slug: /develop/api-reference/caching-and-state/st.cache_resource description: st.cache_resource is used to cache functions that return shared global resources (e.g. database connections, ML models). --- -This page only contains information on the `st.cache_resource` API. For a deeper dive into caching and how to use it, check out [Caching](/library/advanced-features/caching). +This page only contains information on the `st.cache_resource` API. For a deeper dive into caching and how to use it, check out [Caching](/develop/concepts/architecture/caching). - + - + #### Example @@ -71,7 +71,7 @@ def load_model(): ### Input widgets -You can also use [interactive input widgets](/library/api-reference/widgets) like `st.slider` or `st.text_input` in cached functions. Widget replay is an experimental feature at the moment. To enable it, you need to set the `experimental_allow_widgets` parameter: +You can also use [interactive input widgets](/develop/api-reference/widgets) like `st.slider` or `st.text_input` in cached functions. Widget replay is an experimental feature at the moment. To enable it, you need to set the `experimental_allow_widgets` parameter: ```python @st.cache_resource(experimental_allow_widgets=True) # 👈 Set the parameter diff --git a/content/library/api/performance/cache.md b/content/develop/api-reference/caching-and-state/cache.md similarity index 79% rename from content/library/api/performance/cache.md rename to content/develop/api-reference/caching-and-state/cache.md index 535e80914..1e324f53e 100644 --- a/content/library/api/performance/cache.md +++ b/content/develop/api-reference/caching-and-state/cache.md @@ -1,6 +1,6 @@ --- title: st.cache -slug: /library/api-reference/performance/st.cache +slug: /develop/api-reference/caching-and-state/st.cache description: st.cache is used to memoize function executions. --- @@ -25,9 +25,9 @@ The main limitation is that Streamlit’s cache feature doesn’t know about changes that take place outside the body of the annotated function. For more information about the Streamlit cache, its configuration parameters, -and its limitations, see [Caching](/library/advanced-features/caching). +and its limitations, see [Caching](/develop/concepts/architecture/caching). - + diff --git a/content/library/api/performance/experimental-memo.md b/content/develop/api-reference/caching-and-state/experimental-memo.md similarity index 89% rename from content/library/api/performance/experimental-memo.md rename to content/develop/api-reference/caching-and-state/experimental-memo.md index 84d269c7f..019109f3b 100644 --- a/content/library/api/performance/experimental-memo.md +++ b/content/develop/api-reference/caching-and-state/experimental-memo.md @@ -1,16 +1,16 @@ --- title: st.experimental_memo -slug: /library/api-reference/performance/st.experimental_memo +slug: /develop/api-reference/caching-and-state/st.experimental_memo description: st.experimental_memo is used to memoize function executions. --- -This is an experimental feature. Experimental features and their APIs may change or be removed at any time. To learn more, click [here](/library/advanced-features/prerelease#experimental-features). +This is an experimental feature. Experimental features and their APIs may change or be removed at any time. To learn more, click [here](/develop/quick-reference/prerelease#experimental-features). - + Persistent memo caches currently don't support TTL. `ttl` will be ignored if `persist` is specified: @@ -36,7 +36,7 @@ streamlit run app.py 2022-09-22 13:35:41.587 The memoized function 'load_data' has a TTL that will be ignored. Persistent memo caches currently don't support TTL. ``` - + #### Example @@ -133,7 +133,7 @@ Supported static `st` elements in cache-decorated functions include: ## Replay input widgets in cache-decorated functions -In addition to static elements, functions decorated with `@st.experimental_memo` can also contain [input widgets](/library/api-reference/widgets)! Replaying input widgets is disabled by default. To enable it, you can set the `experimental_allow_widgets` parameter for `@st.experimental_memo` to `True`. The example below enables widget replaying, and shows the use of a checkbox widget within a cache-decorated function. +In addition to static elements, functions decorated with `@st.experimental_memo` can also contain [input widgets](/develop/api-reference/widgets)! Replaying input widgets is disabled by default. To enable it, you can set the `experimental_allow_widgets` parameter for `@st.experimental_memo` to `True`. The example below enables widget replaying, and shows the use of a checkbox widget within a cache-decorated function. ```python import streamlit as st @@ -201,7 +201,7 @@ Let's now understand how enabling and disabling widget replay changes the behavi - Calling a cached function multiple times in one script run with the same arguments triggers a `DuplicateWidgetID` error. - If the arguments to a cached function change, widgets from that function that render again retain their state. - Changing the source code of a cached function invalidates the cache. -- Both [`st.experimental_memo`](/library/api-reference/performance/st.experimental_memo) and [`st.experimental_singleton`](/library/api-reference/performance/st.experimental_singleton) support widget replay. +- Both [`st.experimental_memo`](/develop/api-reference/caching-and-state/st.experimental_memo) and [`st.experimental_singleton`](/develop/api-reference/caching-and-state/st.experimental_singleton) support widget replay. - Fundamentally, the behavior of a function with (supported) widgets in it doesn't change when it is decorated with `@st.experimental_memo` or `@st.experimental_singleton`. The only difference is that the function is only executed when we detect a cache "miss". ### Supported widgets diff --git a/content/library/api/performance/experimental-singleton.md b/content/develop/api-reference/caching-and-state/experimental-singleton.md similarity index 90% rename from content/library/api/performance/experimental-singleton.md rename to content/develop/api-reference/caching-and-state/experimental-singleton.md index 515ad13fd..6e6543804 100644 --- a/content/library/api/performance/experimental-singleton.md +++ b/content/develop/api-reference/caching-and-state/experimental-singleton.md @@ -1,18 +1,18 @@ --- title: st.experimental_singleton -slug: /library/api-reference/performance/st.experimental_singleton +slug: /develop/api-reference/caching-and-state/st.experimental_singleton description: st.experimental_singleton is a function decorator used to store singleton objects. --- -This is an experimental feature. Experimental features and their APIs may change or be removed at any time. To learn more, click [here](/library/advanced-features/prerelease#experimental-features). +This is an experimental feature. Experimental features and their APIs may change or be removed at any time. To learn more, click [here](/develop/quick-reference/prerelease#experimental-features). - + - + #### Example @@ -126,7 +126,7 @@ Supported static `st` elements in cache-decorated functions include: ## Replay input widgets in cache-decorated functions -In addition to static elements, functions decorated with `@st.experimental_singleton` can also contain [input widgets](/library/api-reference/widgets)! Replaying input widgets is disabled by default. To enable it, you can set the `experimental_allow_widgets` parameter for `@st.experimental_singleton` to `True`. The example below enables widget replaying, and shows the use of a checkbox widget within a cache-decorated function. +In addition to static elements, functions decorated with `@st.experimental_singleton` can also contain [input widgets](/develop/api-reference/widgets)! Replaying input widgets is disabled by default. To enable it, you can set the `experimental_allow_widgets` parameter for `@st.experimental_singleton` to `True`. The example below enables widget replaying, and shows the use of a checkbox widget within a cache-decorated function. ```python import streamlit as st @@ -194,7 +194,7 @@ Let's now understand how enabling and disabling widget replay changes the behavi - Calling a cached function multiple times in one script run with the same arguments triggers a `DuplicateWidgetID` error. - If the arguments to a cached function change, widgets from that function that render again retain their state. - Changing the source code of a cached function invalidates the cache. -- Both [`st.experimental_singleton`](/library/api-reference/performance/st.experimental_singleton) and [`st.experimental_memo`](/library/api-reference/performance/st.experimental_memo) support widget replay. +- Both [`st.experimental_singleton`](/develop/api-reference/caching-and-state/st.experimental_singleton) and [`st.experimental_memo`](/develop/api-reference/caching-and-state/st.experimental_memo) support widget replay. - Fundamentally, the behavior of a function with (supported) widgets in it doesn't change when it is decorated with `@st.experimental_singleton` or `@st.experimental_memo`. The only difference is that the function is only executed when we detect a cache "miss". ### Supported widgets diff --git a/content/library/api/utilities/experimental_get_query_params.md b/content/develop/api-reference/caching-and-state/experimental_get_query_params.md similarity index 65% rename from content/library/api/utilities/experimental_get_query_params.md rename to content/develop/api-reference/caching-and-state/experimental_get_query_params.md index 268b63742..5d44b0ff5 100644 --- a/content/library/api/utilities/experimental_get_query_params.md +++ b/content/develop/api-reference/caching-and-state/experimental_get_query_params.md @@ -1,7 +1,7 @@ --- title: st.experimental_get_query_params -slug: /library/api-reference/utilities/st.experimental_get_query_params +slug: /develop/api-reference/caching-and-state/st.experimental_get_query_params description: st.experimental_get_query_params returns query parameters currently showing in the browser's URL bar. --- - + diff --git a/content/library/api/utilities/experimental_set_query_params.md b/content/develop/api-reference/caching-and-state/experimental_set_query_params.md similarity index 64% rename from content/library/api/utilities/experimental_set_query_params.md rename to content/develop/api-reference/caching-and-state/experimental_set_query_params.md index 3bd839f35..b0369c0b2 100644 --- a/content/library/api/utilities/experimental_set_query_params.md +++ b/content/develop/api-reference/caching-and-state/experimental_set_query_params.md @@ -1,7 +1,7 @@ --- title: st.experimental_set_query_params -slug: /library/api-reference/utilities/st.experimental_set_query_params +slug: /develop/api-reference/caching-and-state/st.experimental_set_query_params description: st.experimental_set_query_params sets query parameters shown in the browser's URL bar. --- - + diff --git a/content/library/api/utilities/query_params.md b/content/develop/api-reference/caching-and-state/query_params.md similarity index 73% rename from content/library/api/utilities/query_params.md rename to content/develop/api-reference/caching-and-state/query_params.md index f2d86a993..678700672 100644 --- a/content/library/api/utilities/query_params.md +++ b/content/develop/api-reference/caching-and-state/query_params.md @@ -1,6 +1,6 @@ --- title: st.query_params -slug: /library/api-reference/utilities/st.query_params +slug: /develop/api-reference/caching-and-state/st.query_params description: st.query_params reads and manipulates query parameters in the browser's URL bar. --- @@ -27,11 +27,11 @@ A key-value pair prefixed with `?` is added to the end of your app's URL. Additi ### Repeated keys -When a key is repeated in your app's URL (`?a=1&a=2&a=3`), dict-like methods will return only the last value. In this example, `st.query_params["a"]` returns `"3"`. To get all keys as a list, use the [`.get_all()`](/library/api-reference/utilities/st.query_params#stquery_paramsget_all) method shown below. To set the value of a repeated key, assign the values as a list. For example, `st.query_params.a = ["1", "2", "3"]` produces the repeated key given at the beginning of this paragraph. +When a key is repeated in your app's URL (`?a=1&a=2&a=3`), dict-like methods will return only the last value. In this example, `st.query_params["a"]` returns `"3"`. To get all keys as a list, use the [`.get_all()`](/develop/api-reference/caching-and-state/st.query_params#stquery_paramsget_all) method shown below. To set the value of a repeated key, assign the values as a list. For example, `st.query_params.a = ["1", "2", "3"]` produces the repeated key given at the beginning of this paragraph. ### Limitation -`st.query_params` can't get or set embedding settings as described in [Embed your app](/streamlit-community-cloud/share-your-app/embed-your-app#embed-options). `st.query_params.embed` and `st.query_params.embed_options` will raise an `AttributeError` or `StreamlitAPIException` when trying to get or set their values, respectively. +`st.query_params` can't get or set embedding settings as described in [Embed your app](/deploy/streamlit-community-cloud/share-your-app/embed-your-app#embed-options). `st.query_params.embed` and `st.query_params.embed_options` will raise an `AttributeError` or `StreamlitAPIException` when trying to get or set their values, respectively. diff --git a/content/library/api/state/state.md b/content/develop/api-reference/caching-and-state/session_state.md similarity index 85% rename from content/library/api/state/state.md rename to content/develop/api-reference/caching-and-state/session_state.md index e6c7bf4fc..17480f7ce 100644 --- a/content/library/api/state/state.md +++ b/content/develop/api-reference/caching-and-state/session_state.md @@ -1,12 +1,12 @@ --- title: Session State -slug: /library/api-reference/session-state +slug: /develop/api-reference/caching-and-state/st.session_state description: st.session_state is a way to share variables between reruns, for each user session. --- # Session State -Session State is a way to share variables between reruns, for each user session. In addition to the ability to store and persist state, Streamlit also exposes the ability to manipulate state using Callbacks. Session state also persists across apps inside a [multipage app](/library/advanced-features/multipage-apps). +Session State is a way to share variables between reruns, for each user session. In addition to the ability to store and persist state, Streamlit also exposes the ability to manipulate state using Callbacks. Session state also persists across apps inside a [multipage app](/develop/concepts/multipage-apps). Check out this Session State basics tutorial video by Streamlit Developer Advocate Dr. Marisa Smith to get started: @@ -148,11 +148,11 @@ with st.form(key='my_form'): ### Serializable Session State -Serialization refers to the process of converting an object or data structure into a format that can be persisted and shared, and allowing you to recover the data’s original structure. Python’s built-in [pickle](https://docs.python.org/3/library/pickle.html) module serializes Python objects to a byte stream ("pickling") and deserializes the stream into an object ("unpickling"). +Serialization refers to the process of converting an object or data structure into a format that can be persisted and shared, and allowing you to recover the data’s original structure. Python’s built-in [pickle](https://docs.python.org/3/develop/pickle.html) module serializes Python objects to a byte stream ("pickling") and deserializes the stream into an object ("unpickling"). -By default, Streamlit’s [Session State](/library/advanced-features/session-state) allows you to persist any Python object for the duration of the session, irrespective of the object’s pickle-serializability. This property lets you store Python primitives such as integers, floating-point numbers, complex numbers and booleans, dataframes, and even [lambdas](https://docs.python.org/3/reference/expressions.html#lambda) returned by functions. However, some execution environments may require serializing all data in Session State, so it may be useful to detect incompatibility during development, or when the execution environment will stop supporting it in the future. +By default, Streamlit’s [Session State](/develop/concepts/architecture/session-state) allows you to persist any Python object for the duration of the session, irrespective of the object’s pickle-serializability. This property lets you store Python primitives such as integers, floating-point numbers, complex numbers and booleans, dataframes, and even [lambdas](https://docs.python.org/3/reference/expressions.html#lambda) returned by functions. However, some execution environments may require serializing all data in Session State, so it may be useful to detect incompatibility during development, or when the execution environment will stop supporting it in the future. -To that end, Streamlit provides a `runner.enforceSerializableSessionState` [configuration option](/library/advanced-features/configuration) that, when set to `true`, only allows pickle-serializable objects in Session State. To enable the option, either create a global or project config file with the following or use it as a command-line flag: +To that end, Streamlit provides a `runner.enforceSerializableSessionState` [configuration option](/develop/concepts/configuration) that, when set to `true`, only allows pickle-serializable objects in Session State. To enable the option, either create a global or project config file with the following or use it as a command-line flag: ```toml # .streamlit/config.toml @@ -160,7 +160,7 @@ To that end, Streamlit provides a `runner.enforceSerializableSessionState` [conf enforceSerializableSessionState = true ``` -By "_pickle-serializable_", we mean calling `pickle.dumps(obj)` should not raise a [`PicklingError`](https://docs.python.org/3/library/pickle.html#pickle.PicklingError) exception. When the config option is enabled, adding unserializable data to session state should result in an exception. E.g., +By "_pickle-serializable_", we mean calling `pickle.dumps(obj)` should not raise a [`PicklingError`](https://docs.python.org/3/develop/pickle.html#pickle.PicklingError) exception. When the config option is enabled, adding unserializable data to session state should result in an exception. E.g., ```python import streamlit as st diff --git a/content/library/api/charts/charts.md b/content/develop/api-reference/charts/_index.md similarity index 88% rename from content/library/api/charts/charts.md rename to content/develop/api-reference/charts/_index.md index a7db9d3a7..a37d23f54 100644 --- a/content/library/api/charts/charts.md +++ b/content/develop/api-reference/charts/_index.md @@ -1,6 +1,6 @@ --- title: Chart elements -slug: /library/api-reference/charts +slug: /develop/api-reference/charts --- # Chart elements @@ -14,8 +14,10 @@ Lite](https://vega.github.io/vega-lite/) (2D charts) and finally we also provide a few chart types that are "native" to Streamlit, like `st.line_chart` and `st.area_chart`. +## Simple chart elements + - + screenshot

    Simple area charts

    @@ -27,7 +29,7 @@ st.area_chart(my_data_frame) ```
    - + screenshot

    Simple bar charts

    @@ -39,7 +41,7 @@ st.bar_chart(my_data_frame) ```
    - + screenshot

    Simple line charts

    @@ -51,7 +53,7 @@ st.line_chart(my_data_frame) ```
    - + screenshot

    Simple scatter charts

    @@ -63,7 +65,7 @@ st.scatter_chart(my_data_frame) ```
    - + screenshot

    Scatterplots on maps

    @@ -75,7 +77,12 @@ st.map(my_data_frame) ```
    - +
    + +## Advanced chart elements + + + screenshot

    Matplotlib

    @@ -87,7 +94,7 @@ st.pyplot(my_mpl_figure) ```
    - + screenshot

    Altair

    @@ -99,7 +106,7 @@ st.altair_chart(my_altair_chart) ```
    - + screenshot

    Vega-Lite

    @@ -111,7 +118,7 @@ st.vega_lite_chart(my_vega_lite_chart) ```
    - + screenshot

    Plotly

    @@ -123,7 +130,7 @@ st.plotly_chart(my_plotly_chart) ```
    - + screenshot

    Bokeh

    @@ -135,7 +142,7 @@ st.bokeh_chart(my_bokeh_chart) ```
    - + screenshot

    PyDeck

    @@ -147,7 +154,7 @@ st.pydeck_chart(my_pydeck_chart) ```
    - + screenshot

    GraphViz

    diff --git a/content/library/api/charts/altair_chart.md b/content/develop/api-reference/charts/altair_chart.md similarity index 98% rename from content/library/api/charts/altair_chart.md rename to content/develop/api-reference/charts/altair_chart.md index 8a3c283e3..460b9bd9a 100644 --- a/content/library/api/charts/altair_chart.md +++ b/content/develop/api-reference/charts/altair_chart.md @@ -1,6 +1,6 @@ --- title: st.altair_chart -slug: /library/api-reference/charts/st.altair_chart +slug: /develop/api-reference/charts/st.altair_chart description: st.altair_chart displays a chart using the Altair library. --- @@ -149,7 +149,7 @@ source = get_data() Next, we define a function `get_chart()` to create the interactive time-series chart of the stock prices with a multi-line tooltip. The x-axis represents the date, and the y-axis represents the stock price. -We then invoke `get_chart()` that takes the stock prices dataframe as an input and returns a chart object. This is going to be our base chart on which we will overlay the annotations in [Step 2](/library/api-reference/charts/st.altair_chart#step-2-annotate-the-chart). +We then invoke `get_chart()` that takes the stock prices dataframe as an input and returns a chart object. This is going to be our base chart on which we will overlay the annotations in [Step 2](/develop/api-reference/charts/st.altair_chart#step-2-annotate-the-chart). ```python # Define the base time-series chart. @@ -202,7 +202,7 @@ For simplicity, let's annotate four specific dates and set the height of the ann -You can vary the horizontal and vertical postions of the annotations by replacing the hard-coded values with the output of Streamlit widgets! Click [here](/library/api-reference/charts/st.altair_chart#interactive-example) to jump to a live example below, and develop an intuition for the ideal horizontal and vertical positions of the annotations by playing with Streamlit widgets. +You can vary the horizontal and vertical postions of the annotations by replacing the hard-coded values with the output of Streamlit widgets! Click [here](/develop/api-reference/charts/st.altair_chart#interactive-example) to jump to a live example below, and develop an intuition for the ideal horizontal and vertical positions of the annotations by playing with Streamlit widgets. diff --git a/content/library/api/charts/area_chart.md b/content/develop/api-reference/charts/area_chart.md similarity index 55% rename from content/library/api/charts/area_chart.md rename to content/develop/api-reference/charts/area_chart.md index ac834cd70..50bbbf71c 100644 --- a/content/library/api/charts/area_chart.md +++ b/content/develop/api-reference/charts/area_chart.md @@ -1,7 +1,9 @@ --- title: st.area_chart -slug: /library/api-reference/charts/st.area_chart +slug: /develop/api-reference/charts/st.area_chart description: st.area_chart displays an area chart. --- + + diff --git a/content/library/api/charts/bar_chart.md b/content/develop/api-reference/charts/bar_chart.md similarity index 55% rename from content/library/api/charts/bar_chart.md rename to content/develop/api-reference/charts/bar_chart.md index 20b8899a4..7500ecc26 100644 --- a/content/library/api/charts/bar_chart.md +++ b/content/develop/api-reference/charts/bar_chart.md @@ -1,7 +1,9 @@ --- title: st.bar_chart -slug: /library/api-reference/charts/st.bar_chart +slug: /develop/api-reference/charts/st.bar_chart description: st.bar_chart displays a bar chart. --- + + diff --git a/content/library/api/charts/bokeh_chart.md b/content/develop/api-reference/charts/bokeh_chart.md similarity index 74% rename from content/library/api/charts/bokeh_chart.md rename to content/develop/api-reference/charts/bokeh_chart.md index 10a57efde..1195e4dea 100644 --- a/content/library/api/charts/bokeh_chart.md +++ b/content/develop/api-reference/charts/bokeh_chart.md @@ -1,6 +1,6 @@ --- title: st.bokeh_chart -slug: /library/api-reference/charts/st.bokeh_chart +slug: /develop/api-reference/charts/st.bokeh_chart description: st.bokeh_chart displays an interactive Bokeh chart. --- diff --git a/content/library/api/charts/graphviz_chart.md b/content/develop/api-reference/charts/graphviz_chart.md similarity index 75% rename from content/library/api/charts/graphviz_chart.md rename to content/develop/api-reference/charts/graphviz_chart.md index 9ca464f10..f0a7a643c 100644 --- a/content/library/api/charts/graphviz_chart.md +++ b/content/develop/api-reference/charts/graphviz_chart.md @@ -1,6 +1,6 @@ --- title: st.graphviz_chart -slug: /library/api-reference/charts/st.graphviz_chart +slug: /develop/api-reference/charts/st.graphviz_chart description: st.graphviz_chart displays a graph using the dagre-d3 library. --- diff --git a/content/library/api/charts/line_chart.md b/content/develop/api-reference/charts/line_chart.md similarity index 55% rename from content/library/api/charts/line_chart.md rename to content/develop/api-reference/charts/line_chart.md index 5023daa55..f0c8730b9 100644 --- a/content/library/api/charts/line_chart.md +++ b/content/develop/api-reference/charts/line_chart.md @@ -1,7 +1,9 @@ --- title: st.line_chart -slug: /library/api-reference/charts/st.line_chart +slug: /develop/api-reference/charts/st.line_chart description: st.line_chart displays a line chart. --- + + diff --git a/content/library/api/charts/map.md b/content/develop/api-reference/charts/map.md similarity index 55% rename from content/library/api/charts/map.md rename to content/develop/api-reference/charts/map.md index 698801612..bcfde0b52 100644 --- a/content/library/api/charts/map.md +++ b/content/develop/api-reference/charts/map.md @@ -1,7 +1,9 @@ --- title: st.map -slug: /library/api-reference/charts/st.map +slug: /develop/api-reference/charts/st.map description: st.map displays a map with points on it. --- + + diff --git a/content/library/api/charts/plotly_chart.md b/content/develop/api-reference/charts/plotly_chart.md similarity index 98% rename from content/library/api/charts/plotly_chart.md rename to content/develop/api-reference/charts/plotly_chart.md index 00772b003..c0d461f2b 100644 --- a/content/library/api/charts/plotly_chart.md +++ b/content/develop/api-reference/charts/plotly_chart.md @@ -1,6 +1,6 @@ --- title: st.plotly_chart -slug: /library/api-reference/charts/st.plotly_chart +slug: /develop/api-reference/charts/st.plotly_chart description: st.plotly_chart displays an interactive Plotly chart. --- diff --git a/content/library/api/charts/pydeck_chart.md b/content/develop/api-reference/charts/pydeck_chart.md similarity index 74% rename from content/library/api/charts/pydeck_chart.md rename to content/develop/api-reference/charts/pydeck_chart.md index 2131ab6b4..abf4c59ab 100644 --- a/content/library/api/charts/pydeck_chart.md +++ b/content/develop/api-reference/charts/pydeck_chart.md @@ -1,6 +1,6 @@ --- title: st.pydeck_chart -slug: /library/api-reference/charts/st.pydeck_chart +slug: /develop/api-reference/charts/st.pydeck_chart description: st.pydeck_chart displays a chart using the PyDeck library. --- diff --git a/content/library/api/charts/pyplot.md b/content/develop/api-reference/charts/pyplot.md similarity index 74% rename from content/library/api/charts/pyplot.md rename to content/develop/api-reference/charts/pyplot.md index ef81d2756..bfff466ec 100644 --- a/content/library/api/charts/pyplot.md +++ b/content/develop/api-reference/charts/pyplot.md @@ -1,6 +1,6 @@ --- title: st.pyplot -slug: /library/api-reference/charts/st.pyplot +slug: /develop/api-reference/charts/st.pyplot description: st.pyplot displays a matplotlib.pyplot figure. --- diff --git a/content/library/api/charts/scatter_chart.md b/content/develop/api-reference/charts/scatter_chart.md similarity index 57% rename from content/library/api/charts/scatter_chart.md rename to content/develop/api-reference/charts/scatter_chart.md index 6b4dd1c9c..237a1061f 100644 --- a/content/library/api/charts/scatter_chart.md +++ b/content/develop/api-reference/charts/scatter_chart.md @@ -1,7 +1,9 @@ --- title: st.scatter_chart -slug: /library/api-reference/charts/st.scatter_chart +slug: /develop/api-reference/charts/st.scatter_chart description: st.scatter_chart displays an scatter chart. --- + + diff --git a/content/library/api/charts/vega_lite_chart.md b/content/develop/api-reference/charts/vega_lite_chart.md similarity index 95% rename from content/library/api/charts/vega_lite_chart.md rename to content/develop/api-reference/charts/vega_lite_chart.md index aa008e341..6a82c6e3d 100644 --- a/content/library/api/charts/vega_lite_chart.md +++ b/content/develop/api-reference/charts/vega_lite_chart.md @@ -1,11 +1,13 @@ --- title: st.vega_lite_chart -slug: /library/api-reference/charts/st.vega_lite_chart +slug: /develop/api-reference/charts/st.vega_lite_chart description: st.vega_lite_chart displays a chart using the Vega-Lite library. --- + + ### Theming Vega-Lite charts are displayed using the Streamlit theme by default. This theme is sleek, user-friendly, and incorporates Streamlit's color palette. The added benefit is that your charts better integrate with the rest of your app's design. diff --git a/content/library/api/chat/chat.md b/content/develop/api-reference/chat/_index.md similarity index 85% rename from content/library/api/chat/chat.md rename to content/develop/api-reference/chat/_index.md index 38be9bc2b..cc28fba5d 100644 --- a/content/library/api/chat/chat.md +++ b/content/develop/api-reference/chat/_index.md @@ -1,6 +1,6 @@ --- title: Chat elements -slug: /library/api-reference/chat +slug: /develop/api-reference/chat --- # Chat elements @@ -10,7 +10,7 @@ Streamlit provides a few commands to help you build conversational apps. These c `st.chat_message` lets you insert a chat message container into the app so you can display messages from the user or the app. Chat containers can contain other Streamlit elements, including charts, tables, text, and more. `st.chat_input` lets you display a chat input widget so the user can type in a message. Remember to check out `st.status` to display output from long-running processes and external API calls. - + screenshot @@ -25,7 +25,7 @@ if prompt: ``` - + screenshot @@ -41,7 +41,7 @@ with st.chat_message("user"): ``` - + screenshot @@ -55,7 +55,7 @@ with st.status('Running'): ``` - +

    st.write_stream

    diff --git a/content/library/api/chat/chat-input.md b/content/develop/api-reference/chat/chat-input.md similarity index 63% rename from content/library/api/chat/chat-input.md rename to content/develop/api-reference/chat/chat-input.md index 7eff53900..52ec3284e 100644 --- a/content/library/api/chat/chat-input.md +++ b/content/develop/api-reference/chat/chat-input.md @@ -1,12 +1,12 @@ --- title: st.chat_input -slug: /library/api-reference/chat/st.chat_input +slug: /develop/api-reference/chat/st.chat_input description: st.chat_input displays a chat input widget. --- -Read the [Build a basic LLM chat app](/knowledge-base/tutorials/build-conversational-apps) tutorial to learn how to use `st.chat_message` and `st.chat_input` to build chat-based apps. +Read the [Build a basic LLM chat app](/develop/tutorials/llms/build-conversational-apps) tutorial to learn how to use `st.chat_message` and `st.chat_input` to build chat-based apps. diff --git a/content/library/api/chat/chat-message.md b/content/develop/api-reference/chat/chat-message.md similarity index 64% rename from content/library/api/chat/chat-message.md rename to content/develop/api-reference/chat/chat-message.md index 9d258d530..7bdc31589 100644 --- a/content/library/api/chat/chat-message.md +++ b/content/develop/api-reference/chat/chat-message.md @@ -1,12 +1,12 @@ --- title: st.chat_message -slug: /library/api-reference/chat/st.chat_message +slug: /develop/api-reference/chat/st.chat_message description: st.chat_message inserts a chat message container into the app. --- -Read the [Build a basic LLM chat app](/knowledge-base/tutorials/build-conversational-apps) tutorial to learn how to use `st.chat_message` and `st.chat_input` to build chat-based apps. +Read the [Build a basic LLM chat app](/develop/tutorials/llms/build-conversational-apps) tutorial to learn how to use `st.chat_message` and `st.chat_input` to build chat-based apps. diff --git a/content/library/advanced-features/cli.md b/content/develop/api-reference/command-line/_index.md similarity index 83% rename from content/library/advanced-features/cli.md rename to content/develop/api-reference/command-line/_index.md index 59b7030ee..aeab54042 100644 --- a/content/library/advanced-features/cli.md +++ b/content/develop/api-reference/command-line/_index.md @@ -1,6 +1,6 @@ --- title: Command-line options -slug: /library/advanced-features/cli +slug: /develop/api-reference/cli --- # Command-line interface @@ -55,12 +55,12 @@ Opens the Streamlit documentation (i.e. this website) in a web browser. streamlit cache clear ``` -Clears persisted files from the on-disk [Streamlit cache](/library/api-reference/performance), if +Clears persisted files from the on-disk [Streamlit cache](/develop/api-reference/caching-and-state), if present. ### View all configuration options -As described in [Configuration](/library/advanced-features/configuration), Streamlit has several +As described in [Configuration](/develop/concepts/configuration), Streamlit has several configuration options. To view them all, including their current values, just type: ```bash diff --git a/content/develop/api-reference/command-line/run.md b/content/develop/api-reference/command-line/run.md new file mode 100644 index 000000000..0bcb7cd57 --- /dev/null +++ b/content/develop/api-reference/command-line/run.md @@ -0,0 +1,74 @@ +--- +title: streamlit run +slug: /develop/api-reference/cli/run +--- + +## `$ streamlit run` + +### Syntax + +``` +streamlit run [-- config options] [script args] +``` + +### Arguments + +``: The path to your entrypoint file for your Streamlit app. Your entrypoint file is your app's homepage. + +### Options + +Configuration options are passed in the form of `--
    .