# Table of Contents
- [Streamlit Community Cloud - Streamlit Docs](#streamlit-community-cloud-streamlit-docs)
- [undefined - Streamlit Docs](#undefined-streamlit-docs)
- [Prep and deploy your app on Community Cloud - Streamlit Docs](#prep-and-deploy-your-app-on-community-cloud-streamlit-docs)
- [Streamlit documentation](#streamlit-documentation)
- [Connect your GitHub account - Streamlit Docs](#connect-your-github-account-streamlit-docs)
- [File organization for your Community Cloud app - Streamlit Docs](#file-organization-for-your-community-cloud-app-streamlit-docs)
- [Fork and edit a public app - Streamlit Docs](#fork-and-edit-a-public-app-streamlit-docs)
- [Quickstart - Streamlit Docs](#quickstart-streamlit-docs)
- [Streamlit Trust and Security - Streamlit Docs](#streamlit-trust-and-security-streamlit-docs)
- [Secrets management for your Community Cloud app - Streamlit Docs](#secrets-management-for-your-community-cloud-app-streamlit-docs)
- [Manage your account - Streamlit Docs](#manage-your-account-streamlit-docs)
- [Get started with Streamlit Community Cloud - Streamlit Docs](#get-started-with-streamlit-community-cloud-streamlit-docs)
- [Create your account - Streamlit Docs](#create-your-account-streamlit-docs)
- [App dependencies for your Community Cloud app - Streamlit Docs](#app-dependencies-for-your-community-cloud-app-streamlit-docs)
- [Deploy your app on Community Cloud - Streamlit Docs](#deploy-your-app-on-community-cloud-streamlit-docs)
- [Deploy - Streamlit Docs](#deploy-streamlit-docs)
- [Deploy an app from a template - Streamlit Docs](#deploy-an-app-from-a-template-streamlit-docs)
- [Explore your workspace - Streamlit Docs](#explore-your-workspace-streamlit-docs)
- [App settings - Streamlit Docs](#app-settings-streamlit-docs)
- [Delete your account - Streamlit Docs](#delete-your-account-streamlit-docs)
- [Manage your GitHub connection - Streamlit Docs](#manage-your-github-connection-streamlit-docs)
- [Edit your app - Streamlit Docs](#edit-your-app-streamlit-docs)
- [Update your email - Streamlit Docs](#update-your-email-streamlit-docs)
- [Share your app - Streamlit Docs](#share-your-app-streamlit-docs)
- [Workspace settings - Streamlit Docs](#workspace-settings-streamlit-docs)
- [Sign in & sign out - Streamlit Docs](#sign-in-sign-out-streamlit-docs)
- [Rename or change your app's GitHub coordinates - Streamlit Docs](#rename-or-change-your-app-s-github-coordinates-streamlit-docs)
- [Embed your app - Streamlit Docs](#embed-your-app-streamlit-docs)
- [Upgrade your app's Streamlit version on Streamlit Community Cloud - Streamlit Docs](#upgrade-your-app-s-streamlit-version-on-streamlit-community-cloud-streamlit-docs)
- [Upgrade your app's Python version on Community Cloud - Streamlit Docs](#upgrade-your-app-s-python-version-on-community-cloud-streamlit-docs)
- [Manage your app - Streamlit Docs](#manage-your-app-streamlit-docs)
- [App analytics - Streamlit Docs](#app-analytics-streamlit-docs)
- [Reboot your app - Streamlit Docs](#reboot-your-app-streamlit-docs)
- [Delete your app - Streamlit Docs](#delete-your-app-streamlit-docs)
- [Favorite your app - Streamlit Docs](#favorite-your-app-streamlit-docs)
- [Deployment concepts - Streamlit Docs](#deployment-concepts-streamlit-docs)
- [Status and limitations - Streamlit Docs](#status-and-limitations-streamlit-docs)
- [SEO and search indexability - Streamlit Docs](#seo-and-search-indexability-streamlit-docs)
- [Managing dependencies when deploying your app - Streamlit Docs](#managing-dependencies-when-deploying-your-app-streamlit-docs)
- [Share previews - Streamlit Docs](#share-previews-streamlit-docs)
- [Managing secrets when deploying your app - Streamlit Docs](#managing-secrets-when-deploying-your-app-streamlit-docs)
- [Deployment tutorials - Streamlit Docs](#deployment-tutorials-streamlit-docs)
- [Deploy Streamlit using Docker - Streamlit Docs](#deploy-streamlit-using-docker-streamlit-docs)
- [Streamlit in Snowflake - Streamlit Docs](#streamlit-in-snowflake-streamlit-docs)
- [Deploy Streamlit using Kubernetes - Streamlit Docs](#deploy-streamlit-using-kubernetes-streamlit-docs)
- [st.cache_data - Streamlit Docs](#st-cache-data-streamlit-docs)
- [API Reference - Streamlit Docs](#api-reference-streamlit-docs)
---
# Streamlit Community Cloud - Streamlit Docs
[](#welcome-to-streamlit-community-cloud)
Welcome to Streamlit Community Cloud
================================================================================
With Streamlit Community Cloud, you can create, deploy, and manage your Streamlit apps — all for free. Share your apps with the world and build a customized profile page to display your work. Your Community Cloud account connects directly to your GitHub repositories (public or private). Most apps will launch in only a few minutes. Community Cloud handles all of the containerization, so deploying is easy. Bring your own code, or start from one of our popular templates. 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. Start coding or editing a Streamlit app with just a few clicks. See [Edit your app](/deploy/streamlit-community-cloud/manage-your-app/edit-your-app)
.
Go to our [Community Cloud quickstart](/deploy/streamlit-community-cloud/get-started/quickstart)
to speed-run through creating your account, deploying an example app, and editing it using GitHub Codespaces. If you haven't built your first Streamlit app yet, see [Get started with Streamlit](/get-started)
.
[_arrow\_forward_](/deploy/streamlit-community-cloud/get-started)
[Get started.](/deploy/streamlit-community-cloud/get-started)
Learn about Streamlit Community Cloud accounts and how to create one.
[_flight\_takeoff_](/deploy/streamlit-community-cloud/deploy-your-app)
[Deploy your app.](/deploy/streamlit-community-cloud/deploy-your-app)
A step-by-step guide on how to get your app deployed.
[_settings_](/deploy/streamlit-community-cloud/manage-your-app)
[Manage your app.](/deploy/streamlit-community-cloud/manage-your-app)
Access logs, reboot apps, set favorites, and more. Jump into a GitHub codespace to edit your app in the cloud.
[_share_](/deploy/streamlit-community-cloud/share-your-app)
[Share your app.](/deploy/streamlit-community-cloud/share-your-app)
Share or embed your app.
[_manage\_accounts_](/deploy/streamlit-community-cloud/manage-your-account)
[Manage your account.](/deploy/streamlit-community-cloud/manage-your-account)
Update your email, manage connections, or delete your account.
[Previous: Concepts](/deploy/concepts)
[Next: Get started](/deploy/streamlit-community-cloud/get-started)
_forum_
### Still have questions?
Our [forums](https://discuss.streamlit.io)
are full of helpful information and Streamlit experts.
---
# undefined - Streamlit Docs
### [](#cookie-settings)
Cookie settings
##### [](#strictly-necessary-cookies)
Strictly necessary cookies
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
##### [](#performance-cookies)
Performance cookies
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
##### [](#functional-cookies)
Functional cookies
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
##### [](#targeting-cookies)
Targeting cookies
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.
_forum_
### Still have questions?
Our [forums](https://discuss.streamlit.io)
are full of helpful information and Streamlit experts.
---
# Prep and deploy your app on Community Cloud - Streamlit Docs
[](#prep-and-deploy-your-app-on-community-cloud)
Prep and deploy your app on Community Cloud
==============================================================================================
Streamlit Community Cloud lets you deploy your apps in just one click, and most apps will be deployed in only a few minutes. If you don't have an app ready to deploy, you can fork or clone one from our [App gallery](https://streamlit.io/gallery)
—you can find apps for machine learning, data visualization, data exploration, A/B testing, and more. You can also [Deploy an app from a template](/deploy/streamlit-community-cloud/get-started/deploy-from-a-template)
. After 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)
.
_push\_pin_
#### Note
If you want to deploy your app on a different cloud service, see our [Deployment tutorials](/deploy/tutorials)
.
[](#summary)
Summary
----------------------
The pages that follow explain how to organize your app and provide complete information for Community Cloud to run it correctly.
When your app has everything it needs, deploying is easy. Just go to your workspace and click "**Create app**" in the upper-right corner. Follow the prompts to fill in your app's information, and then click "**Deploy**."

[](#ready-set-go)
Ready, set, go!
-----------------------------------
[_description_](/deploy/streamlit-community-cloud/deploy-your-app/file-organization)
[File organization.](/deploy/streamlit-community-cloud/deploy-your-app/file-organization)
Learn how Community Cloud initializes your app and interprets paths. Learn where to put your configuration files.
[_build\_circle_](/deploy/streamlit-community-cloud/deploy-your-app/app-dependencies)
[App dependencies.](/deploy/streamlit-community-cloud/deploy-your-app/app-dependencies)
Learn how to install dependencies and other Python libraries into your deployment environment.
[_password_](/deploy/streamlit-community-cloud/deploy-your-app/secrets-management)
[Secrets management.](/deploy/streamlit-community-cloud/deploy-your-app/secrets-management)
Learn about the interface Community Cloud provides to securely upload your `secrets.toml` data.
[_flight\_takeoff_](/deploy/streamlit-community-cloud/deploy-your-app/deploy)
[Deploy your app](/deploy/streamlit-community-cloud/deploy-your-app/deploy)
Put it all together to deploy your app for the whole world to see.
[Previous: Get started](/deploy/streamlit-community-cloud/get-started)
[Next: File organization](/deploy/streamlit-community-cloud/deploy-your-app/file-organization)
_forum_
### Still have questions?
Our [forums](https://discuss.streamlit.io)
are full of helpful information and Streamlit experts.
---
# Streamlit documentation
[](#Streamlit-documentation)
Streamlit documentation
======================================================
[Streamlit](https://www.streamlit.io)
is an open-source Python framework for data scientists and AI/ML engineers to deliver dynamic data apps with only a few lines of code. Build and deploy powerful data apps in minutes. Let's get started!
[_install\_desktop_\
\
#### Setup and installation\
\
Get set up to start working with Streamlit.](/get-started/installation)
[_dvr_\
\
#### API reference\
\
Learn about our APIs, with actionable explanations of specific functions and features.](/develop/api-reference)
[_grid\_view_\
\
#### App gallery\
\
Try out awesome apps created by our users, and curated from our forums or Twitter.](https://streamlit.io/gallery)
[](#How-to-use-our-docs)
How to use our docs
----------------------------------------------
[_rocket\_launch_](/get-started)
[Get started](/get-started)
with Streamlit! Set up your development environment and learn the fundamental concepts, and start coding!
[_description_](/develop)
[Develop](/develop)
your Streamlit app! Our API reference explains each Streamlit function with examples. Dive deep into all of our features with conceptual guides. Try out our step-by-step tutorials.
[_cloud_](/deploy)
[Deploy](/deploy)
your Streamlit app! Streamlit Community Cloud our free platform for deploying and sharing Streamlit apps. Streamlit in Snowflake is an enterprise-class solution where you can house your data and apps in one, unified, global system. Explore all your options!
[_school_](/knowledge-base)
[Knowledge base](/knowledge-base)
is a self-serve library of tips, tricks, and articles that answer your questions about creating and deploying Streamlit apps.
What's new
------------
[_attach\_file_\
\
#### File uploader for `st.chat_input`\
\
User's can upload files directly within`st.chat_input`!](/develop/api-reference/chat/st.chat_input)
[_view\_column_\
\
#### JSON column configuration\
\
`st.dataframe` and `st.data_editor`support JSON compatible objects.](/develop/api-reference/data/st.column_config/st.column_config.jsoncolumn)
[_download_\
\
#### Download buttons without reruns\
\
You can disable app reruns for`st.download_button`.](/develop/api-reference/widgets/st.download_button)
[_timer_\
\
#### Access the user's timezone\
\
`st.context` lets you read the user's timezone and timezone offset.](/develop/api-reference/caching-and-state/st.context#contexttimezone)
[_height_\
\
#### Dataframe row height\
\
You can set the height of rows in `st.dataframe`and `st.data_editor`.](/develop/api-reference/data/st.dataframe)
[_edit_\
\
#### Markdown image captions\
\
Markdown has a new `:small[]` directive for small text, the same size as `st.caption`.](/develop/api-reference/text/st.markdown)
Latest blog posts
-------------------
[View all updates](https://blog.streamlit.io/)
Join the community
------------------
Streamlit is more than just a way to make data apps, it's also a community of creators that share their apps and ideas and help each other make their work better. Please come join us on the community forum. We love to hear your questions, ideas, and help you work through your bugs — stop by today!
[View forum](https://discuss.streamlit.io)

Other Media
-----------
* [##### GitHub\
\
View the Streamlit source code and issue tracker.](https://github.com/streamlit)
* [##### YouTube\
\
Watch screencasts made by the Streamlit team and the community.](https://www.youtube.com/channel/UC3LD42rjj-Owtxsa6PwGU5Q)
* [##### Twitter\
\
Follow @streamlit on Twitter to keep up with the latest news.](https://twitter.com/streamlit)
* [##### LinkedIn\
\
Follow @streamlit on the world's largest professional network.](https://www.linkedin.com/company/streamlit)
* [##### Newsletter\
\
Sign up for communications from Streamlit.](https://info.snowflake.com/streamlit-newsletter-sign-up.html)
[Next: Get started](/get-started)
---
# Connect your GitHub account - Streamlit Docs
[](#connect-your-github-account)
Connect your GitHub account
==============================================================
Connecting GitHub to your Streamlit Community Cloud account allows you to deploy apps directly from the files you store in your repositories. It also lets the system check for updates to those files and automatically update your apps. When you first connect your GitHub account to your Community Cloud account, you'll be able to deploy apps from your public repositories to Community Cloud. If you want to deploy from private repositories, you can give Community Cloud additional permissions to do so. For more information about these permissions, see [GitHub OAuth scope](/deploy/streamlit-community-cloud/status#github-oauth-scope)
.
_priority\_high_
#### Important
In order to deploy an app, you must have **admin** permissions to its repository. If you don't have admin access, contact the repository's owner or fork the repository to create your own copy. For more help, see our [community forum](https://discuss.streamlit.io/)
.
If you are a member of a GitHub organization, that organization is displayed at the bottom of each GitHub OAuth prompt. In this case, we recommend reading about [Organization access](#organization-access)
at the end of this page before performing the steps to connect your GitHub account. You must be an organization's owner in GitHub to grant access to that organization.
[](#prerequisites)
Prerequisites
----------------------------------
* You must have a Community Cloud account. See [Create your account](/deploy/streamlit-community-cloud/get-started/create-your-account)
.
* You must have a GitHub account.
[](#add-access-to-public-repositories)
Add access to public repositories
--------------------------------------------------------------------------
1. In the upper-left corner, click "**Workspaces _warning_**."

1. From the drop down, click "**Connect GitHub account**."
2. Enter your GitHub credentials and follow GitHub's authentication prompts.
3. Click "**Authorize streamlit**."

This adds the "Streamlit" OAuth application to your GitHub account. This allows Community Cloud to work with your public repositories and create codespaces for you. In the next section, you can allow Community Cloud to access your private repositories, too. For more information about using and reviewing the OAuth applications on your account, see [Using OAuth apps](https://docs.github.com/en/apps/oauth-apps/using-oauth-apps)
in GitHub's docs.
[](#optional-add-access-to-private-repositories)
Optional: Add access to private repositories
-----------------------------------------------------------------------------------------------
After your Community Cloud account has access to deploy from your public repositories, you can follow these additional steps to grant access to your private repositories.
1. In the upper-left corner, click on your GitHub username.

1. From the drop down, click "**Settings**."
2. On the left side of the dialog, select "**Linked accounts**."
3. Under "Source control," click "**Connect here _arrow\_forward_**."
4. Click "**Authorize streamlit**."

[](#organization-access)
Organization access
----------------------------------------------
To deploy apps from repositories owned by a GitHub organization, Community Cloud must have permission to access the organization's repositories. If you are a member of a GitHub organization when you connect your GitHub account, your OAuth prompts will include a section labeled "Organization access."

If you have already connected your GitHub account and need to add access to an organization, follow the steps in [Manage your GitHub connection](/deploy/streamlit-community-cloud/manage-your-account/manage-your-github-connection)
to disconnect your GitHub account and start over. Alternatively, if you are not the owner of an organization, you can ask the owner to create a Community Cloud account for themselves and add permission directly.
### [](#organizations-you-own)
Organizations you own
For any organization you own, if authorization has not been previously granted or denied, you can click "**Grant**" before you click "**Authorize streamlit**."

### [](#organizations-owned-by-others)
Organizations owned by others
For an organization you don't own, if authorization has not been previously granted or denied, you can click "**Request**" before you click "**Authorize streamlit**."

### [](#previous-or-pending-authorization)
Previous or pending authorization
If someone has already started the process of authorizing Streamlit for your organization, the OAuth prompt will show the current status.
#### [](#approved-access)
Approved access
If an organization has already granted Streamlit access, the OAuth prompt shows a green check (_check_).

#### [](#pending-access)
Pending access
If a request has been previously sent but not yet approved, the OAuth prompt show "Access request pending." Follow up with the organization's owner to accept the request in GitHub.

#### [](#denied-access)
Denied access
If a request has been previously sent and denied, the OAuth prompt shows a red X (_close_). In this case, the organization owner will need to authorize Streamlit from GitHub. See GitHub's documentation on [OAuth apps and organizations](https://docs.github.com/en/apps/oauth-apps/using-oauth-apps/authorizing-oauth-apps#oauth-apps-and-organizations)
.

[](#whats-next)
What's next?
------------------------------
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)
.
[Previous: Create your account](/deploy/streamlit-community-cloud/get-started/create-your-account)
[Next: Explore your workspace](/deploy/streamlit-community-cloud/get-started/explore-your-workspace)
_forum_
### Still have questions?
Our [forums](https://discuss.streamlit.io)
are full of helpful information and Streamlit experts.
---
# File organization for your Community Cloud app - Streamlit Docs
[](#file-organization-for-your-community-cloud-app)
File organization for your Community Cloud app
====================================================================================================
Streamlit Community Cloud copies all the files in your repository and executes `streamlit run` from its root directory. Because Community Cloud is creating a new Python environment to run your app, you need to include a declaration of any [App dependencies](/deploy/streamlit-community-cloud/deploy-your-app/app-dependencies)
in addition to any [Configuration](/develop/concepts/configuration)
options.
You can have multiple apps in your repository, and their entrypoint files can be anywhere in your repository. However, you can only have one configuration file. This page explains how to correctly organize your app, configuration, and dependency files. The following examples assume you are using `requirements.txt` to declare your dependencies because it is the most common. As explained on the next page, Community Cloud supports other formats for configuring your Python environment.
[](#basic-example)
Basic example
----------------------------------
In the following example, the entrypoint file (`your_app.py`) is in the root of the project directory alongside a `requirements.txt` file to declare the app's dependencies.
`your_repository/ ├── requirements.txt └── your_app.py`
If you are including custom configuration, your config file must be located at `.streamlit/config.toml` within your repository.
`your_repository/ ├── .streamlit/ │ └── config.toml ├── requirements.txt └── your_app.py`
Additionally, any files that need to be locally available to your app should be included in your repository.
_star_
#### Tip
If you have really big or binary data that you change frequently, and git is running slowly, you might want to check out [Git Large File Store (LFS)](https://git-lfs.github.com/)
as a better way to store large files in GitHub. You don't need to make any changes to your app to start using it. If your GitHub repository uses LFS, it will _just work_ with Streamlit Community Cloud.
[](#use-an-entrypoint-file-in-a-subdirectory)
Use an entrypoint file in a subdirectory
----------------------------------------------------------------------------------------
When your entrypoint file is in a subdirectory, the configuration file must stay at the root. However, your dependency file may be either at the root or next to your entrypoint file.
Your dependency file can be at the root of your repository while your entrypoint file is in a subdirectory.
`your_repository/ ├── .streamlit/ │ └── config.toml ├── requirements.txt └── subdirectory └── your_app.py`
Alternatively, your dependency file can be in the same subdirectory as your entrypoint file.
`your_repository/ ├── .streamlit/ │ └── config.toml └── subdirectory ├── requirements.txt └── your_app.py`
Although most Streamlit commands interpret paths relative to the entrypoint file, some commands interpret paths relative to the working directory. On Community Cloud, the working directory is always the root of your repository. Therefore, when developing and testing your app locally, execute `streamlit run` from the root of your repository. This ensures that paths are interpreted consistently between your local environment and Community Cloud.
In the previous example, this would look something like this:
`cd your_repository streamlit run subdirectory/your_app.py`
_star_
#### Tip
Remember to always use forward-slash path separators in your paths. Community Cloud can't work with backslash-separated paths.
[](#multiple-apps-in-one-repository)
Multiple apps in one repository
----------------------------------------------------------------------
When you have multiple apps in one repository, they share the same configuration file (`.streamlit/config.toml`) at the root of your repository. A dependency file may be shared or configured separately for these multiple apps. To define separate dependency files for your apps, place each entrypoint file in its own subdirectory along with its own dependency file. To learn more about how Community Cloud prioritizes and parses dependency files, see [App dependencies](/deploy/streamlit-community-cloud/deploy-your-app/app-dependencies)
.
[Previous: Deploy your app](/deploy/streamlit-community-cloud/deploy-your-app)
[Next: App dependencies](/deploy/streamlit-community-cloud/deploy-your-app/app-dependencies)
_forum_
### Still have questions?
Our [forums](https://discuss.streamlit.io)
are full of helpful information and Streamlit experts.
---
# Fork and edit a public app - Streamlit Docs
[](#fork-and-edit-a-public-app)
Fork and edit a public app
============================================================
Community Cloud is all about learning, sharing, and exploring the world of Streamlit. For apps with public repositories, you can quickly fork copies to your GitHub account, deploy your own version, and jump into a codespace on GitHub to start editing and exploring Streamlit code.
1. From a forkable app, in the upper-right corner, click "**Fork**."

2. Optional: In the "App URL" field, choose a custom subdomain for your app.
Every Community Cloud app is deployed to a subdomain on `streamlit.app`, but you can change your app's subdomain at any time. For more information, see [App settings](/deploy/streamlit-community-cloud/manage-your-app/app-settings)
.
3. Click "**Fork!**"
The repository will be forked to your GitHub account. If you have already forked the repository, Community Cloud will use the existing fork. If your existing fork already has an associated codespace, the codespace will be reused.
_priority\_high_
#### Warning
Do not use this method in the following situations:
* You have an existing repository that matches the fork name (but isn't a fork of this app).
* You have an existing fork of this app, but you've changed the name of the repository.
If you have an existing fork of this app and kept the original repository name, Community Cloud will use your existing fork. If you've previously deployed the app and opened a codespace, Community Cloud will open your existing codespace.

4. Wait for GitHub to set up your codespace.
It can take several minutes to fully initialize your codespace. After the Visual Studio Code editor appears in your codespace, it can take several minutes to install Python and start the Streamlit server. When complete, a split screen view displays a code editor on the left and a running app on the right. The code editor opens two tabs by default: the repository's readme file and the app's entrypoint file.

_priority\_high_
#### Important
The app displayed in your codespace is not the same instance you deployed on Community Cloud. Your codespace is a self-contained development environment. When you make edits inside a codespace, those edits don't leave the codespace until you commit them to your repository. When you commit your changes to your repository, Community Cloud detects the changes and updates your deployed app. To learn more, see [Edit your app](/deploy/streamlit-community-cloud/manage-your-app/edit-your-app)
.
5. Edit your newly forked app as desired. For more instructions on working with GitHub Codespaces, see [Edit your app](/deploy/streamlit-community-cloud/manage-your-app/edit-your-app)
.
[Previous: Deploy from a template](/deploy/streamlit-community-cloud/get-started/deploy-from-a-template)
[Next: Trust and security](/deploy/streamlit-community-cloud/get-started/trust-and-security)
_forum_
### Still have questions?
Our [forums](https://discuss.streamlit.io)
are full of helpful information and Streamlit experts.
---
# Quickstart - Streamlit Docs
[](#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](/deploy/streamlit-community-cloud/get-started/create-your-account)
.
You will sign in to your GitHub account during this process. Community Cloud will use the email from your GitHub account to create your Community Cloud account. For other sign-in options, see [Create your account](/deploy/streamlit-community-cloud/get-started/create-your-account)
.
[](#prerequisites)
Prerequisites
----------------------------------
* You must have a GitHub account.
[](#sign-up-for-streamlit-community-cloud)
Sign up for Streamlit Community Cloud
----------------------------------------------------------------------------------
1. Go to [share.streamlit.io](https://share.streamlit.io)
.
2. Click "**Continue to sign-in**."
3. Click "**Continue with GitHub**."
4. Enter your GitHub credentials and follow GitHub's authentication prompts.
5. Fill in your account information, and click "**I accept**" at the bottom.
[](#add-access-to-your-public-repositories)
Add access to your public repositories
------------------------------------------------------------------------------------
1. In the upper-left corner, click "**Workspaces _warning_**."

1. From the drop down, click "**Connect GitHub account**."
2. Enter your GitHub credentials and follow GitHub's authentication prompts.
3. Click "**Authorize streamlit**."

[](#optional-add-access-to-private-repositories)
Optional: Add access to private repositories
-----------------------------------------------------------------------------------------------
1. In the upper-left corner, click on your GitHub username.

1. From the drop down, click "**Settings**."
2. On the left side of the dialog, select "**Linked accounts**."
3. Under "Source control," click "**Connect here _arrow\_forward_**."
4. Click "**Authorize streamlit**."

[](#create-a-new-app-from-a-template)
Create a new app from a template
------------------------------------------------------------------------
1. In the upper-right corner, click "**Create app**."

1. When asked "Do you already have an app?" click "**Nope, create one from a template**."
2. From the list of templates on the left, select "**Blank app**."
3. At the bottom, select the option to "**Open GitHub Codespaces...**"
4. At the bottom, click "**Deploy**."
[](#edit-your-app-in-github-codespaces)
Edit your app in GitHub Codespaces
----------------------------------------------------------------------------
1. Wait for GitHub to set up your codespace.
It can take several minutes to fully initialize your codespace. After the Visual Studio Code editor appears in your codespace, it can take several minutes to install Python and start the Streamlit server. When complete, a split screen view displays a code editor on the left and a running app on the right. The code editor opens two tabs by default: the repository's readme file and the app's entrypoint file.

2. Go to the app's entrypoint file (`streamlit_app.py`) in the left pane, and change line 3 by adding "Streamlit" inside `st.title`.
`-st.title("🎈 My new app") +st.title("🎈 My new Streamlit app")`
Files are automatically saved in your codespace with each edit.
3. A moment after typing a change, your app on the right side will display a rerun prompt. Click "**Always rerun**."

If the rerun prompt disappears before you click it, you can hover over the overflow menu icon (_more\_vert_) to bring it back.
4. Optional: Continue to make edits and observe the changes within seconds.
[](#publish-your-changes)
Publish your changes
------------------------------------------------
1. In the left navigation bar, click the source control icon.

1. In the source control sidebar on the left, enter a name for your commit.
2. Click "**_check_ Commit**."

1. To stage and commit all your changes, in the confirmation dialog, click "**Yes**." Your changes are committed locally in your codespace.
2. To push your commit to GitHub, in the source control sidebar on the left, click "**_cached_ 1 _arrow\_upward_**."
3. To push commits to "origin/main," in the confirmation dialog, click "**OK**."
Your changes are now saved to your GitHub repository. Community Cloud will immediately reflect the changes in your deployed app.
4. Optional: To see your updated, published app, return to the "**My apps**" section of your workspace at [share.streamlit.io](https://share.streamlit.io)
, and click on your app.
[](#stop-or-delete-your-codespace)
Stop or delete your codespace
------------------------------------------------------------------
When you stop interacting with your codespace, GitHub will generally stop your codespace for you. However, the surest way to avoid undesired use of your capacity is to stop or delete your codespace when you are done.
1. Go to [github.com/codespaces](https://github.com/codespaces)
. At the bottom of the page, all your codespaces are listed. Click the overflow menu icon (_more\_horiz_) for your codespace.

2. If you want to return to your work later, click "**Stop codespace**." Otherwise, click "**Delete**."

3. Congratulations! You just deployed an app to Streamlit Community Cloud. 🎉 Return to your workspace at [share.streamlit.io/](https://share.streamlit.io/)
and [deploy another Streamlit app](/deploy/streamlit-community-cloud/deploy-your-app)
.

[Previous: Get started](/deploy/streamlit-community-cloud/get-started)
[Next: Create your account](/deploy/streamlit-community-cloud/get-started/create-your-account)
_forum_
### Still have questions?
Our [forums](https://discuss.streamlit.io)
are full of helpful information and Streamlit experts.
---
# Streamlit Trust and Security - Streamlit Docs
[](#streamlit-trust-and-security)
Streamlit trust and security
================================================================
Streamlit is a framework that turns Python scripts into interactive apps, giving data scientists the ability to quickly create data and model-based apps for the entire company.
A simple Streamlit app is:
`import streamlit as st number = st.slider("Pick a number: ", min_value=1, max_value=10) st.text("Your number is " + str(number))`
When you `streamlit run my_app.py`, you start a web server that runs the interactive application on your local computer at `http://localhost:8501`. This is great for local development. When you want to share with your colleagues, Streamlit Community Cloud enables you to deploy and run these applications in the cloud. Streamlit Community Cloud handles the details of containerization and provides you an interface for easily managing your deployed apps.
This document provides an overview of the security safeguards we've implemented to protect you and your data. Security, however, is a shared responsibility and you are ultimately responsible for making appropriate use of Streamlit and the Streamlit Community Cloud, including implementation of appropriate user-configurable security safeguards and best practices.
[](#product-security)
Product security
----------------------------------------
### [](#authentication)
Authentication
You must authenticate through GitHub to deploy or administer an app. Authentication through Google or single-use emailed links are required to view a private app when you don't have push or admin permissions on the associated GitHub repository. The single-use emailed links are valid for 15 minutes once requested.
### [](#permissions)
Permissions
Streamlit Community Cloud inherits the permissions you have assigned in GitHub. Users with write access to a GitHub repository for a given app will be able to make changes in the Streamlit administrative console. However, only users with _admin access_ to a repository are able to **deploy and delete apps**.
[](#network-and-application-security)
Network and application security
------------------------------------------------------------------------
### [](#data-hosting)
Data hosting
Our physical infrastructure is hosted and managed within secure data centers maintained by infrastructure-as-a-service cloud providers. Streamlit leverages many of these platforms' built-in security, privacy, and redundancy features. Our cloud providers continually monitor their data centers for risk and undergo assessments to ensure compliance with industry standards.
### [](#data-deletion)
Data deletion
Community Cloud users have the option to delete any apps they’ve deployed as well as their entire account.
When a user deletes their application from the admin console, we delete their source code, including any files copied from their GitHub repository or created within our system from the running app. However, we keep a record representing the application in our database. This record contains the coordinates of the application: the GitHub organization or user, the GitHub repository, the branch, and the path of the main module file.
When a user deletes their account, we perform a hard deletion of their data and a hard deletion of all the apps that belong to the GitHub identity associated with their account. In this case, we do not maintain the records of application coordinates described above. When an account is deleted, we also delete any HubSpot contact associated with the Community Cloud account.
### [](#virtual-private-cloud)
Virtual private cloud
All of our servers are within a virtual private cloud (VPC) with firewalls and network access control lists (ACLs) to allow external access to a select few API endpoints; all other internal services are only accessible within the VPC.
### [](#encryption)
Encryption
Streamlit apps are served entirely over HTTPS. We use only strong cipher suites and HTTP Strict Transport Security (HSTS) to ensure browsers interact with Streamlit apps over HTTPS.
All data sent to or from Streamlit over the public internet is encrypted in transit using 256-bit encryption. Our API and application endpoints use Transport Layer Security (TLS) 1.2 (or better). We also encrypt data at rest on disk using AES-256.
### [](#permissions-and-authentication)
Permissions and authentication
Access to Community Cloud user account data is limited to authorized personnel. We run a zero-trust corporate network, utilize single sign-on and multi-factor authentication (MFA), and enforce strong password policies to ensure access to cloud-related services is protected.
### [](#incident-response)
Incident response
Our internal protocol for handling security events includes detection, analysis, response, escalation, and mitigation. Security advisories are made available at [https://streamlit.io/advisories](https://streamlit.io/advisories)
.
### [](#penetration-testing)
Penetration testing
Streamlit uses third-party security tools to scan for vulnerabilities on a regular basis. Our security teams conduct periodic, intensive penetration tests on the Streamlit platform. Our product development team responds to any identified issues or potential vulnerabilities to ensure the quality, security, and availability of Streamlit applications.
### [](#vulnerability-management)
Vulnerability management
We keep our systems up-to-date with the latest security patches and continuously monitor for new vulnerabilities. This includes automated scanning of our code repositories for vulnerable dependencies.
If you discover a vulnerability in one of our products or websites, please report the issue to [HackerOne](https://hackerone.com/snowflake?type=team)
.
[Previous: Fork and edit a public app](/deploy/streamlit-community-cloud/get-started/fork-and-edit-a-public-app)
[Next: Deploy your app](/deploy/streamlit-community-cloud/deploy-your-app)
_forum_
### Still have questions?
Our [forums](https://discuss.streamlit.io)
are full of helpful information and Streamlit experts.
---
# Secrets management for your Community Cloud app - Streamlit Docs
[](#secrets-management-for-your-community-cloud-app)
Secrets management for your Community Cloud app
======================================================================================================
[](#introduction)
Introduction
--------------------------------
If you are [connecting to data sources](/develop/tutorials/databases)
, you will likely need to handle credentials or secrets. Storing unencrypted secrets in a git repository is a bad practice. 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.
[](#how-to-use-secrets-management)
How to use secrets management
------------------------------------------------------------------
Community Cloud lets you save your secrets within your app's settings. When developing locally, you can use `st.secrets` in your code to read secrets from a `.streamlit/secrets.toml` file. However, this `secrets.toml` file should never be committed to your repository. Instead, when you deploy your app, you can paste the contents of your `secrets.toml` file into the "**Advanced settings**" dialog. You can update your secrets at any time through your app's settings in your workspace.
### [](#prerequisites)
Prerequisites
* You should understand how to use `st.secrets` and `secrets.toml`. See [Secrets management](/develop/concepts/connections/secrets-management)
.
### [](#advanced-settings)
Advanced settings
While deploying your app, you can access "**Advanced settings**" to set your secrets. After your app is deployed, you can view or update your secrets through the app's settings. The deployment workflow is fully described on the next page, but the "**Advanced settings**" dialog looks like this:

Simply copy and paste the contents of your local `secrets.toml` file into the "Secrets" field within the dialog. After you click "**Save**" to commit the changes, that's it!
### [](#edit-your-apps-secrets)
Edit your app's secrets
If you need to add or edit your secrets for an app that is already deployed, you can access secrets through your [App settings](/deploy/streamlit-community-cloud/manage-your-app/app-settings)
. See [View or update your secrets](/deploy/streamlit-community-cloud/manage-your-app/app-settings#view-or-update-your-secrets)
.
[Previous: App dependencies](/deploy/streamlit-community-cloud/deploy-your-app/app-dependencies)
[Next: Deploy!](/deploy/streamlit-community-cloud/deploy-your-app/deploy)
_forum_
### Still have questions?
Our [forums](https://discuss.streamlit.io)
are full of helpful information and Streamlit experts.
---
# Manage your account - Streamlit Docs
[](#manage-your-account)
Manage your account
==============================================
You can [Update your email](/deploy/streamlit-community-cloud/manage-your-account/update-your-email)
or completely [Delete your account](/deploy/streamlit-community-cloud/manage-your-account/delete-your-account)
through [Workspace settings](/deploy/streamlit-community-cloud/manage-your-account/workspace-settings)
.
Your Streamlit Community Cloud account is identified by your email. When you sign in to Community Cloud, regardless of which method you use, you are providing Community Cloud with your email address. In particular, when you sign in to Community Cloud using GitHub, you are using the primary email on your GitHub account. You can view your email identity and source-control identity from your workspace settings, under "[**Linked accounts**](/deploy/streamlit-community-cloud/manage-your-account/workspace-settings#linked-accounts)
."
[](#access-your-workspace-settings)
Access your workspace settings
--------------------------------------------------------------------
1. Sign in to [share.streamlit.io](https://share.streamlit.io)
.
2. In the upper-left corner, click on your workspace name.
3. In the drop-down menu, click "**Settings**."

[Previous: Share your app](/deploy/streamlit-community-cloud/share-your-app)
[Next: Sign in & sign out](/deploy/streamlit-community-cloud/manage-your-account/sign-in-sign-out)
_forum_
### Still have questions?
Our [forums](https://discuss.streamlit.io)
are full of helpful information and Streamlit experts.
---
# Get started with Streamlit Community Cloud - Streamlit Docs
[](#get-started-with-streamlit-community-cloud)
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.
First things first, you need to create your Streamlit Community Cloud account to start deploying apps.
[_rocket\_launch_\
\
#### Quickstart\
\
Create your account and deploy an example app as fast as possible. Jump right into coding with GitHub Codespaces.](/deploy/streamlit-community-cloud/get-started/quickstart?slug=deploy&slug=streamlit-community-cloud&slug=get-started)
[_security_\
\
#### Trust and Security\
\
Security first! If you want to read up on how we handle your data before you get started, we've got you covered.](/deploy/streamlit-community-cloud/get-started/trust-and-security?slug=deploy&slug=streamlit-community-cloud&slug=get-started)
If you're looking for help to build your first Streamlit app, read our [Get started](/get-started)
docs for the Streamlit library. If you want to fork an app and start with an example, check out our [App gallery](https://streamlit.io/gallery)
. Either way, it only takes a few minutes to create your first app.
If you're looking for more detailed instructions than the quickstart, try the following:
[_person_](/deploy/streamlit-community-cloud/get-started/create-your-account)
[Create your account.](/deploy/streamlit-community-cloud/get-started/create-your-account)
See all the options and get complete explanations as you create your Streamlit Community Cloud account.
[_code_](/deploy/streamlit-community-cloud/get-started/connect-your-github-account)
[Connect your GitHub account.](/deploy/streamlit-community-cloud/get-started/connect-your-github-account)
After your create your Community Cloud account, connect GitHub for source control.
[_computer_](/deploy/streamlit-community-cloud/get-started/explore-your-workspace)
[Explore your workspace.](/deploy/streamlit-community-cloud/get-started/explore-your-workspace)
Take a quick tour of your Community Cloud workspace. See where all the magic happens.
[_auto\_fix\_high_](/deploy/streamlit-community-cloud/get-started/deploy-from-a-template)
[Deploy an app from a template.](/deploy/streamlit-community-cloud/get-started/deploy-from-a-template)
Use a template to get your own app up and running in minutes.
[_fork\_right_](/deploy/streamlit-community-cloud/get-started/fork-and-edit-a-public-app)
[Fork and edit a public app.](/deploy/streamlit-community-cloud/get-started/fork-and-edit-a-public-app)
Start with a bang! Fork a public app and jump right into the code.
[Previous: Streamlit Community Cloud](/deploy/streamlit-community-cloud)
[Next: Quickstart](/deploy/streamlit-community-cloud/get-started/quickstart)
_forum_
### Still have questions?
Our [forums](https://discuss.streamlit.io)
are full of helpful information and Streamlit experts.
---
# Create your account - Streamlit Docs
[](#create-your-account)
Create your account
==============================================
Before you can start deploying apps for the world to see, you need to sign up for your Streamlit Community Cloud account.
Each Community Cloud account is associated with an email. Two accounts can't have the same email. When sharing a private app, you will assign viewing privileges by email. Additionally, two accounts can't have the same source control (GitHub account). If you try to create a second Community Cloud account with the same source control, Community Cloud will merge the accounts.
[](#sign-up)
Sign up
----------------------
Community Cloud allows you to sign in using one of the three following methods:
* Emailed, one-use codes
* Google
* GitHub
_priority\_high_
#### Important
Even when you sign in through GitHub, the authentication flow returns your email address to Community Cloud. Changing the email on your GitHub account can affect your Community Cloud account if you sign in through GitHub.
1. Go to [share.streamlit.io](https://share.streamlit.io)
.
2. Click "**Continue to sign-in**."
3. Continue with one of the three options listed below.
### [](#option-1-sign-in-using-emailed-codes)
Option 1: Sign in using emailed codes
1. In the "Email" field, enter your email address.
2. Click "**Continue**." (If prompted, verify you are human.)
3. Go to your email inbox, and copy your one-time, six-digit code. The code is valid for ten minutes.
4. Return to the authentication page, and enter your code. (If prompted, verify you are human.)
### [](#option-2-sign-in-using-google)
Option 2: Sign in using Google
1. Click "**Continue with Google**."
2. Enter your Google credentials, and follow Google's authentication prompts.
### [](#option-3-sign-in-using-github)
Option 3: Sign in using GitHub
1. Click "**Continue with GitHub**."
2. Enter your GitHub credentials, and follow GitHub's authentication prompts.
This adds the "Streamlit Community Cloud" OAuth application to your GitHub account. This application is only used to pass your email when you sign in to Community Cloud. On the next page, you'll perform additional steps to allow Community Cloud to access your repositories. For more information about using and reviewing the OAuth applications on your account, see [Using OAuth apps](https://docs.github.com/en/apps/oauth-apps/using-oauth-apps)
in GitHub's docs.
4. Fill in your information, and click "**Continue**" at the bottom.
The "Primary email" field is prefilled with the email you used to sign in. If you change this email in the account setup form, it will only impact marketing emails; it will not reflect on your new account. To change the email associated with your account after it's created, see [Update your email address](/deploy/streamlit-community-cloud/manage-your-account/update-your-email)
.
[](#finish-up)
Finish up
--------------------------
Congratulations on creating your Streamlit Community Cloud account! A warning icon (_warning_) next to "**Workspaces**" in the upper-left corner is expected; this indicates that your account is not yet connected to GitHub. Even if you created your account by signing in through GitHub, your account does not yet have permission to access your repositories. Continue to the next page to connect your GitHub account.
[Previous: Quickstart](/deploy/streamlit-community-cloud/get-started/quickstart)
[Next: Connect your GitHub account](/deploy/streamlit-community-cloud/get-started/connect-your-github-account)
_forum_
### Still have questions?
Our [forums](https://discuss.streamlit.io)
are full of helpful information and Streamlit experts.
---
# App dependencies for your Community Cloud app - Streamlit Docs
[](#app-dependencies-for-your-community-cloud-app)
App dependencies for your Community Cloud app
==================================================================================================
The main reason that apps fail to build properly is because Streamlit Community Cloud can't find your dependencies! There are two kinds of dependencies your app might have: Python dependencies and external dependencies. Python dependencies are other Python packages (just like Streamlit!) that you `import` into your script. External dependencies are less common, but they include any other software your script needs to function properly. Because Community Cloud runs on Linux, these will be Linux dependencies installed with `apt-get` outside the Python environment.
For your dependencies to be installed correctly, make sure you:
1. Add a [requirements file](#add-python-dependencies)
for Python dependencies.
2. Optional: To manage any external dependencies, add a `packages.txt` file.
_push\_pin_
#### Note
Python requirements files should be placed either in the root of your repository or in the same directory as your app's entrypoint file.
[](#add-python-dependencies)
Add Python dependencies
------------------------------------------------------
With each `import` statement in your script, you are bringing in a Python dependency. You need to tell Community Cloud how to install those dependencies through a Python package manager. We recommend using a `requirements.txt` file, which is based on `pip`.
You should _not_ include [built-in Python libraries](https://docs.python.org/3/py-modindex.html)
like `math`, `random`, or `distutils` in your `requirements.txt` file. These are a part of Python and aren't installed separately. Also, Community Cloud has `streamlit` installed by default. You don't strictly need to include `streamlit` unless you want to pin or restrict the version. If you deploy an app without a `requirements.txt` file, your app will run in an environment with just `streamlit` (and its dependencies) installed.
_priority\_high_
#### Important
The version of Python you use is important! Built-in libraries change between versions of Python and other libraries may have specific version requirements, too. Whenever Streamlit supports a new version of Python, Community Cloud quickly follows to default to that new version of Python. Always develop your app in the same version of Python you will use to deploy it. For more information about setting the version of Python when you deploy your app, see [Optional: Configure secrets and Python version](/deploy/streamlit-community-cloud/deploy-your-app/deploy#optional-configure-secrets-and-python-version)
.
If you have a script like the following, 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.
`import streamlit as st import pandas as pd import numpy as np import math import random st.write("Hi!")`
However, a valid `requirements.txt` file would be:
`streamlit pandas numpy`
Alternatively, if you needed to specify certain versions, another valid example would be:
`streamlit==1.24.1 pandas>2.0 numpy<=1.25.1`
In the above example, `streamlit` is pinned to version `1.24.1`, `pandas` must be strictly greater than version 2.0, and `numpy` must be at-or-below version 1.25.1. Each line in your `requirements.txt` file is effectively what you would like to `pip install` into your cloud environment.
_star_
#### Tip
To learn about limitations of Community Cloud's Python environments, see [Community Cloud status and limitations](/deploy/streamlit-community-cloud/status#python-environments)
.
### [](#other-python-package-managers)
Other Python package managers
There are other Python package managers in addition to `pip`. If you want to consider alternatives to using a `requirements.txt` file, Community Cloud will use the first dependency file it finds. Community Cloud will search the directory where your entrypoint file is, then it will search the root of your repository. In each location, dependency files are prioritized in the following order:
| Recognized Filename | Python Package Manager |
| --- | --- |
| `uv.lock` | [uv](https://docs.astral.sh/uv/concepts/projects/sync/) |
| `Pipfile` | [pipenv](https://pipenv-fork.readthedocs.io/en/latest/basics.html) |
| `environment.yml` | [conda](https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#creating-an-environment-file-manually) |
| `requirements.txt` | [pip](https://pip.pypa.io/en/stable/user_guide/#requirements-files)
† |
| `pyproject.toml` | [poetry](https://python-poetry.org/docs/basic-usage/) |
† For efficiency, Community Cloud will attempt to process `requirements.txt` with `uv`, but will fall back to `pip` if needed. `uv` is generally faster and more efficient than `pip`.
_priority\_high_
#### Warning
You should only use one dependency file for your app. If you include more than one (e.g. `requirements.txt` and `environment.yaml`), only the first file encountered will be used as described above, with any dependency file in your entrypoint file's directory taking precedence over any dependency file in the root of your repository.
[](#apt-get-dependencies)
apt-get dependencies
------------------------------------------------
For many apps, a `packages.txt` file is not required. However, if your script requires any software to be installed that is not a Python package, you need a `packages.txt` file. Community Cloud is built on Debian Linux. Anything you want to `apt-get install` must go in your `packages.txt` file. To browse available packages that can be installed, see the Debian 11 ("bullseye") [package list](https://packages.debian.org/bullseye/)
.
If `packages.txt` exists in the root directory of your repository we automatically detect it, parse it, and install the listed packages. You can read more about apt-get in [Linux documentation](https://linux.die.net/man/8/apt-get)
.
Add **apt-get** dependencies to `packages.txt` — one package name per line. For example, [`mysqlclient`](https://github.com/PyMySQL/mysqlclient)
is a Python package which requires additional software be installed to function. A valid `packages.txt` file to enable `mysqlclient` would be:
`build-essential pkg-config default-libmysqlclient-dev`
[Previous: File organization](/deploy/streamlit-community-cloud/deploy-your-app/file-organization)
[Next: Secrets management](/deploy/streamlit-community-cloud/deploy-your-app/secrets-management)
_forum_
### Still have questions?
Our [forums](https://discuss.streamlit.io)
are full of helpful information and Streamlit experts.
---
# Deploy your app on Community Cloud - Streamlit Docs
[](#deploy-your-app-on-community-cloud)
Deploy your app on Community Cloud
============================================================================
After you've [organized your files](/deploy/streamlit-community-cloud/deploy-your-app/file-organization)
and [added your dependencies](/deploy/streamlit-community-cloud/deploy-your-app/app-dependencies)
as described on the previous pages, you're ready to deploy your app to Community Cloud!
[](#select-your-repository-and-entrypoint-file)
Select your repository and entrypoint file
--------------------------------------------------------------------------------------------
1. From your workspace at [share.streamlit.io](https://share.streamlit.io)
, in the upper-right corner, click "**Create app**."

2. When asked "Do you already have an app?" click "**Yup, I have an app**."
3. Fill in your repository, branch, and file path. Alternatively, to paste a link directly to `your_app.py` on GitHub, click "**Paste GitHub URL**."
4. Optional: In the "App URL" field, choose a subdomain for your new app.
Every Community Cloud app is deployed to a subdomain on `streamlit.app`, but you can change your app's subdomain at any time. For more information, see [App settings](/deploy/streamlit-community-cloud/manage-your-app/app-settings)
. In the following example, Community Cloud will deploy an app to `https://red-balloon.streamlit.app/`.

Although Community Cloud attempts to suggest available repositories and files, these suggestions are not always complete. If the desired information is not listed for any field, enter it manually.
[](#optional-configure-secrets-and-python-version)
Optional: Configure secrets and Python version
---------------------------------------------------------------------------------------------------
_push\_pin_
#### Note
Streamlit Community Cloud supports all released [versions of Python that are still receiving security updates](https://devguide.python.org/versions/)
. Streamlit Community Cloud defaults to version 3.12. You can select a version of your choice from the "Python version" dropdown in the "Advanced settings" modal. If an app is running a version of Python that becomes unsupported, it will be forcibly upgraded to the oldest supported version of Python and may break.
1. Click "**Advanced settings**."
2. Select your desired version of Python.
3. To define environment variables and secrets, in the "Secrets" field, paste the contents of your `secrets.toml` file.
For more information, see [Community Cloud secrets management](/deploy/streamlit-community-cloud/deploy-your-app/secrets-management)
.
4. Click "**Save**."

[](#watch-your-app-launch)
Watch your app launch
--------------------------------------------------
Your app is now being deployed, and you can watch while it launches. Most apps are deployed within a few minutes, but if your app has a lot of dependencies, it may take longer. After the initial deployment, changes to your code should be reflected immediately in your app. Changes to your dependencies will be processed immediately, but may take a few minutes to install.

_push\_pin_
#### Note
The Streamlit Community Cloud logs on the right-hand side of your app are only viewable to users with write 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#cloud-logs)
.
[](#view-your-app)
View your app
----------------------------------
That's it—you're done! Your app now has a unique 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)
Unique subdomains
If the "**Custom subdomain (optional)**" field is blank when you deploy your app, a URL is assigned following a structure based on your GitHub repo. The subdomain of the URL is a dash-separated list of the following:
* Repository owner (GitHub user or organization)
* Repository name
* Entrypoint file path
* Branch name, if other than `main` or `master`
* A random hash
`https://[GitHub username or organization]-[repo name]-[app path]-[branch name]-[short hash].streamlit.app`
For example, the following app is deployed from the `streamlit` organization. The repo is `demo-self-driving` and the app name is `streamlit_app.py` in the root directory. The branch name is `master` and therefore not included.
`https://streamlit-demo-self-driving-streamlit-app-8jya0g.streamlit.app`
### [](#custom-subdomains)
Custom subdomains
Setting a custom subdomain makes it much easier to share your app because you can choose something memorable. To learn how to change the subdomain of a deployed app, see [View or change your app's URL](/deploy/streamlit-community-cloud/manage-your-app/app-settings#view-or-change-your-apps-url)
.
[Previous: Secrets management](/deploy/streamlit-community-cloud/deploy-your-app/secrets-management)
[Next: Manage your app](/deploy/streamlit-community-cloud/manage-your-app)
_forum_
### Still have questions?
Our [forums](https://discuss.streamlit.io)
are full of helpful information and Streamlit experts.
---
# Deploy - Streamlit Docs
[](#deploy)
Deploy
====================
Get all the information you need to deploy your app and share it with your users.
[_book_](/deploy/concepts)
[Concepts.](/deploy/concepts)
Understand the basics of app deployment.
[_cloud_](/deploy/streamlit-community-cloud)
[Streamlit Community Cloud.](/deploy/streamlit-community-cloud)
Deploy your app on our free platform and join a community of developers who share their apps around the world. This is a great place for your non-commerical, personal, and educational apps.
[_ac\_unit_](/deploy/snowflake)
[Snowflake.](/deploy/snowflake)
Deploy your app in Snowflake for a secure, enterprise-grade environment. This is a great place for your business apps.
[_bolt_](/deploy/tutorials)
[Other platforms.](/deploy/tutorials)
Learn how to deploy your app on a variety of platforms with our convenient collection of tutorials.
[Previous: Develop](/develop)
[Next: Concepts](/deploy/concepts)
_forum_
### Still have questions?
Our [forums](https://discuss.streamlit.io)
are full of helpful information and Streamlit experts.
---
# Deploy an app from a template - Streamlit Docs
[](#deploy-an-app-from-a-template)
Deploy an app from a template
==================================================================
Streamlit Community Cloud makes it easy to get started with several convenient templates. Just pick a template, and Community Cloud will fork it to your account and deploy it. Any edits you push to your new fork will immediately show up in your deployed app. Additionally, if you don't want to use a local development environment, Community Cloud makes it easy to create a GitHub codespace that's fully configured for Streamlit app development.
[](#access-the-template-picker)
Access the template picker
------------------------------------------------------------
There are two ways to begin deploying a template: the "**Create app**" button and the template gallery at the bottom of your workspace.
* If you click the "**Create app**" button, Community Cloud will ask you "Do you already have an app?" Select "**Nope, create one from a template**."
* If you scroll to the bottom of your workspace in the "**My apps**" section, you can see the most popular templates. Click on one directly, or select "**View all templates**."
The template picker shows a list of available templates on the left. A preview for the current, selected template shows on the right.

[](#select-a-template)
Select a template
------------------------------------------
1. From the list of templates on the left, select "**GDP dashboard**."
2. Optional: For "Name of new GitHub repository," enter a name for your new, forked repository.
When you deploy a template, Community Cloud forks the template repository into your GitHub account. Community Cloud chooses a default name for this repository based on the selected template. If you have previously deployed the same template with its default name, Community Cloud will append an auto-incrementing number to the name.
_push\_pin_
#### Note
Even if you have another user's or organization's workspace selected, Community Cloud will always deploy a template app from your personal workspace. That is, Community Cloud will always fork a template into your GitHub user account. If you want to deploy a template app from an organization, manually fork the template in GitHub, and deploy it from your fork in the associated workspace.
3. Optional: In the "App URL" field, choose a subdomain for your new app.
Every Community Cloud app is deployed to a subdomain on `streamlit.app`, but you can change your app's subdomain at any time. For more information, see [App settings](/deploy/streamlit-community-cloud/manage-your-app/app-settings)
.
4. Optional: To edit the template in a GitHub codespace immediately, select the option to "**Open GitHub Codespaces...**"
You can create a codespace for your app at any time. To learn how to create a codespace after you've deployed an app, see [Edit your app](/deploy/streamlit-community-cloud/manage-your-app/edit-your-app)
.
5. Optional: To change the version of Python, at the bottom of the screen, click "**Advanced settings**," select a Python version, and then click "**Save**."
_priority\_high_
#### Important
After an app is deployed, you can't change the version of Python without deleting and redeploying the app.
6. At the bottom, click "**Deploy**."
[](#view-your-app)
View your app
----------------------------------
* If you didn't select the option to open GitHub Codespaces, you are redirected to your new app.

* If you selected the option to open GitHub Codespaces, you are redirected to your new codespace, which can take several minutes to be fully initialized. After the Visual Studio Code editor appears in your codespace, it can take several minutes to install Python and start the Streamlit server. When complete, a split screen view displays a code editor on the left and a running app on the right. The code editor opens two tabs by default: the repository's readme file and the app's entrypoint file.

_priority\_high_
#### Important
The app displayed in your codespace is not the same instance you deployed on Community Cloud. Your codespace is a self-contained development environment. When you make edits inside a codespace, those edits don't leave the codespace until you commit them to your repository. When you commit your changes to your repository, Community Cloud detects the changes and updates your deployed app. To learn more, see [Edit your app](/deploy/streamlit-community-cloud/manage-your-app/edit-your-app)
.
[Previous: Explore your workspace](/deploy/streamlit-community-cloud/get-started/explore-your-workspace)
[Next: Fork and edit a public app](/deploy/streamlit-community-cloud/get-started/fork-and-edit-a-public-app)
_forum_
### Still have questions?
Our [forums](https://discuss.streamlit.io)
are full of helpful information and Streamlit experts.
---
# Explore your workspace - Streamlit Docs
[](#explore-your-workspace)
Explore your workspace
====================================================
If you just [created your account](/deploy/streamlit-community-cloud/get-started/create-your-account)
and [connected your GitHub account](/deploy/streamlit-community-cloud/get-started/connect-your-github-account)
, congrats! You are now signed in and ready to go. If you are joining someone else's workspace you may already see some apps.
[](#workspaces)
Workspaces
----------------------------
Each GitHub account and organization is associated with a workspace in Community Cloud. When you sign in to Community Cloud for the first time, you will land in your personal workspace associated with your GitHub user account. The upper-left corner of Community Cloud shows your current workspace.

### [](#switching-workspaces)
Switching workspaces
To switch between workspaces, click the workspace name in the upper-left corner and select a new workspace.
Other workspaces are available to you as follows:
* When you have write permissions to a repository and the repository owner has joined Community Cloud, you can select the associated workspace. An owner can be a GitHub user or organization.
* If someone has shared an app with you through Community Cloud, you will see the app's associated workspace. This is view-only access.

### [](#invite-other-developers-to-your-workspace)
Invite other developers to your workspace
Inviting other developers is simple: Just give them write access to your GitHub repository so that you can code together. When they sign in to [share.streamlit.io](https://share.streamlit.io)
, they'll have access to your workspace.
Streamlit Community Cloud inherits developer permissions from GitHub. When others sign in to Community Cloud, they will automatically see the workspaces they share with you. From there you can all deploy, manage, and share apps together.
_push\_pin_
#### Note
When a user is added to a repository on GitHub, it will take at most 15 minutes before they can deploy or manage the app on Community Cloud. If a user is removed from a repository on GitHub, it will take at most 15 minutes before their permission to manage the app from that repository is revoked.
And remember, whenever anyone on the team updates the code on GitHub, the app will automatically update for you!
[](#my-apps)
My apps
----------------------
The "**My apps**" section of your workspace is your base of operations to deploy and manage your apps. When you deploy an app, it is added to this section of your workspace.
### [](#deploying-apps)
Deploying apps
If you already have an app saved to a GitHub repo, you can deploy it directly. Otherwise, Community Cloud provides templates you can use. When you deploy from a template, Community Cloud will fork a project into your GitHub account and deploy from the new fork. This is a convenient way to get started if you haven't already created a Streamlit app.
To get started, just click "**Create app**" in the upper-right corner. To learn more, see [Deploy your app](/deploy/streamlit-community-cloud/deploy-your-app)
and [Deploy from a template](/deploy/streamlit-community-cloud/get-started/deploy-from-a-template)
.
[](#my-profile)
My profile
----------------------------
The "**My profile**" section of your workspace lets you customize a personal portfolio of Streamlit apps to share with the world. Curate and feature your Streamlit apps to show off your work.
[](#explore)
Explore
----------------------
For inspiration, check out the "**Explore**" section. This is a gallery of Streamlit apps created by the Streamlit community. Check out popular and trending apps, or search for apps in an area that interests you.
[Previous: Connect your GitHub account](/deploy/streamlit-community-cloud/get-started/connect-your-github-account)
[Next: Deploy from a template](/deploy/streamlit-community-cloud/get-started/deploy-from-a-template)
_forum_
### Still have questions?
Our [forums](https://discuss.streamlit.io)
are full of helpful information and Streamlit experts.
---
# App settings - Streamlit Docs
[](#app-settings)
App settings
================================
This page is about your app settings on Streamlit Community Cloud. From your app settings you can [view or change your app's URL](/deploy/streamlit-community-cloud/manage-your-app/app-settings#view-or-change-your-apps-url)
, manage [public or private access to your app](/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 chrome](/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 it's running.
[](#access-your-app-settings)
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)
.
### [](#access-app-settings-from-your-workspace)
Access app settings from your workspace
From your workspace at [share.streamlit.io](https://share.streamlit.io)
, click the overflow icon (_more\_vert_) next to your app. Click "**Settings**."

### [](#access-app-settings-from-your-cloud-logs)
Access app settings from your Cloud logs
From your app at `.streamlit.app`, click "**Manage app**" in the lower-right corner.

Click the overflow menu icon (_more\_vert_) and click "**Settings**."

[](#change-your-app-settings)
Change your app settings
--------------------------------------------------------
### [](#view-or-change-your-apps-url)
View or change your app's URL
To view or customize your app subdomain from the dashboard:
1. Access your app's settings as described above.
2. On the "**General**" tab in the "App settings" dialog, see your app's unique subdomain in the "App URL" field.

3. Optional: Enter a new, custom subdomain between 6 and 63 characters in length, and then click "**Save**."

If a custom subdomain is not available (e.g. because it's already taken or contains restricted words), you'll see an error message. Change your subdomain as indicated.

### [](#update-your-apps-share-settings)
Update your app's share settings
Learn how to [Share your app](/deploy/streamlit-community-cloud/share-your-app)
.

### [](#view-or-update-your-secrets)
View or update your secrets
1. Access your app's settings as described above.
2. On the "**Secrets**" tab in the "App settings" dialog, see your app's secrets in the "Secrets" field.

3. Optional: Add, edit, or delete your secrets, and then click "**Save**."
Learn more about [Secrets management for your Community Cloud app](/deploy/streamlit-community-cloud/deploy-your-app/secrets-management)
.
[Previous: App analytics](/deploy/streamlit-community-cloud/manage-your-app/app-analytics)
[Next: Delete your app](/deploy/streamlit-community-cloud/manage-your-app/delete-your-app)
_forum_
### Still have questions?
Our [forums](https://discuss.streamlit.io)
are full of helpful information and Streamlit experts.
---
# Delete your account - Streamlit Docs
[](#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](/deploy/streamlit-community-cloud/get-started/trust-and-security#data-deletion)
.
_priority\_high_
#### Warning
Deleting your account is permanent and cannot be undone. Make sure you really want to delete your account and all hosted apps before proceeding. Any app you've deployed will be deleted, regardless of the workspace it was deployed from.
[](#how-to-delete-your-account)
How to delete your account
------------------------------------------------------------
Follow these steps to delete your account:
1. Sign in to Streamlit Community Cloud at [share.streamlit.io](https://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**."
3. In the confirmation dialog, follow the prompt and click "**Delete account forever**."
All your information and apps will be permanently deleted.

It's that simple! If you have any questions or run into issues deleting your account, please reach out to us on [our forum](https://discuss.streamlit.io/c/community-cloud/13)
. We're happy to help! 🎈
[Previous: Update your email](/deploy/streamlit-community-cloud/manage-your-account/update-your-email)
[Next: Status and limitations](/deploy/streamlit-community-cloud/status)
_forum_
### Still have questions?
Our [forums](https://discuss.streamlit.io)
are full of helpful information and Streamlit experts.
---
# Manage your GitHub connection - Streamlit Docs
[](#manage-your-github-connection)
Manage your GitHub connection
==================================================================
If you have created an account but not yet connected GitHub, see [Connect your GitHub account](/deploy/streamlit-community-cloud/get-started/connect-your-github-account)
.
If you have already connected your GitHub account but still need to allow Streamlit Community Cloud to access private repositories, see [Optional: Add access to private repositories](/deploy/streamlit-community-cloud/get-started/connect-your-github-account#optional-add-access-to-private-repositories)
.
[](#add-access-to-an-organization)
Add access to an organization
------------------------------------------------------------------
If you are in an organization, you can grant or request access to that organization when you connect your GitHub account. For more information, see [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 in to Community Cloud.
### [](#revoke-and-reauthorize)
Revoke and reauthorize
1. From your workspace, click on your workspace name in the upper-right corner. To sign out of Community Cloud, click "**Sign out**."

2. Go to your GitHub application settings at [github.com/settings/applications](https://github.com/settings/applications)
.
3. Find the "Streamlit" application, and click on the three dots (_more\_horiz_) to open the overflow menu.
If you have ever signed in to Community Cloud using GitHub, you will also see the "Streamlit Community Cloud" application in your GitHub account. The "Streamlit" application manages repository access. The "Streamlit Community Cloud" application is only for managing your identity (email) on Community Cloud. You only need to revoke access to the "Streamlit" application.
4. Click "**Revoke**."

5. Click "**I understand, revoke access**."

1. Return to [share.streamlit.io](https://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)
Granting previously denied access
If an organization owner has restricted Streamlit's access or restricted all OAuth applications, they may need to directly modify their permissions in GitHub. If an organization has restricted Streamlit's access, a red X (_close_) will appear next to the organization when you are prompted to authorize with your GitHub account.

See GitHub's documentation on [OAuth apps and organizations](https://docs.github.com/en/apps/oauth-apps/using-oauth-apps/authorizing-oauth-apps#oauth-apps-and-organizations)
.
[](#rename-your-github-account-or-repositories)
Rename your GitHub account or repositories
--------------------------------------------------------------------------------------------
Community Cloud identifies apps by their GitHub coordinates (owner, repository, branch, entrypoint file path). If you rename your account or repository from which you've deployed an app, you will lose access to administer the app. To learn more, see [Rename your app in GitHub](/deploy/streamlit-community-cloud/manage-your-app/rename-your-app)
.
[Previous: Workspace settings](/deploy/streamlit-community-cloud/manage-your-account/workspace-settings)
[Next: Update your email](/deploy/streamlit-community-cloud/manage-your-account/update-your-email)
_forum_
### Still have questions?
Our [forums](https://discuss.streamlit.io)
are full of helpful information and Streamlit experts.
---
# Edit your app - Streamlit Docs
[](#edit-your-app)
Edit your app
==================================
You can edit your app from any development environment of your choice. Streamlit Community Cloud will monitor your repository and automatically copy any file changes you commit. You will immediately see commits reflected in your deployed app for most changes (such as edits to your app's Python files).
Community Cloud also makes it easy to skip the work of setting up a development environment. With a few simple clicks, you can configure a development environment using GitHub Codespaces.
[](#edit-your-app-with-github-codespaces)
Edit your app with GitHub Codespaces
--------------------------------------------------------------------------------
Spin up a cloud-based development environment for your deployed app in minutes. You can run your app within your codespace to enjoy experimenting in a safe, sandboxed environment. When you are done editing your code, you can commit your changes to your repo or just leave them in your codespace to return to later.
### [](#create-a-codespace-for-your-deployed-app)
Create a codespace for your deployed app
1. From your workspace at [share.streamlit.io](https://share.streamlit.io)
, click the overflow icon (_more\_vert_) next to your app. Click "**Edit with Codespaces**."

Community Cloud will add a `.devcontainer/devcontainer.json` file to your repository. If you already have a file of the same name in your repository, it will not be changed. If you want your repository to receive the instance created by Community Cloud, delete or rename your existing devcontainer configuration.
2. Wait for GitHub to set up your codespace.
It can take several minutes to fully initialize your codespace. After the Visual Studio Code editor appears in your codespace, it can take several minutes to install Python and start the Streamlit server. When complete, a split screen view displays a code editor on the left and a running app on the right. The code editor opens two tabs by default: the repository's readme file and the app's entrypoint file.

3. Optional: For more room to work, open the app preview in another tab.
If you have multiple monitors and want a little more room to work, open your app preview in another tab instead of using the Simple Browser within Visual Studio Code. Just copy the URL from the Simple Browser into another tab, and then close the Simple Browser. Now you have more room to edit your code. The remaining steps on this page will continue to display the split-screen view in Visual Studio Code.
4. Make a change to your app.
When you make changes to your app, the file is automatically saved within your codespace. Your edits do not affect your repository or deployed app until you commit those changes, which is explained in a later step. The app preview shown on the right is local to your codespace.
5. In order to see updates automatically reflected on the right, click "**Always rerun**" when prompted after your first edit.

Alternatively, you can click "**Rerun**" to avoid unnecessary reruns while writing code. Because your code is continually saved, automatically rerunning the app will raises errors when you pause partway through a line of code. Regardless of which you choose, you can change the setting through the app chrome. Just click the overflow icon (_more\_vert_) in the upper-right corner of your preview app, click "**Settings**," and then toggle "**Run on save**."
6. Continue to edit your app. Your codespace will continue to automatically save your files as you work with them, and the preview will continue to update as the app reruns.
### [](#optional-publish-your-changes)
Optional: Publish your changes
After making edits to your app, you can choose to commit your edits to your repository to update your deployed app instantly. If you just want to keep your edits in your codespace to return to later, skip to [Stop or delete your codespace](#stop-or-delete-your-codespace)
.
1. In the left navigation bar, click the source control icon.

2. In the source control sidebar on the left, enter a name for your commit.
3. Click "**_check_ Commit**."

4. To stage and commit all your changes, in the confirmation dialog, click "**Yes**." Your changes are committed locally in your codespace.
5. To push your commit to GitHub, in the source control sidebar on the left, click "**_cached_ 1 _arrow\_upward_**."
6. To push commits to "origin/main," in the confirmation dialog, click "**OK**."
Your changes are now saved to your GitHub repository. Community Cloud will immediately reflect the changes in your deployed app.
7. Optional: To see your updated, published app, return to the "**My apps**" section of your workspace at [share.streamlit.io](https://share.streamlit.io)
, and click on your app.
### [](#stop-or-delete-your-codespace)
Stop or delete your codespace
When you stop interacting with your codespace, GitHub will generally stop your codespace for you. However, the surest way to avoid undesired use of your capacity is to stop or delete your codespace when you are done.
1. Go to [github.com/codespaces](https://github.com/codespaces)
. At the bottom of the page, all your codespaces are listed. Click the overflow menu icon (_more\_horiz_) for your codespace.

2. Click "**Stop codespace**" if you'd like to return to your work later. Otherwise, click "**Delete**."

3. Congratulations! You just deployed an app to Community Cloud. 🎉 Head back to your workspace at [share.streamlit.io/](https://share.streamlit.io/)
and [deploy another Streamlit app](/deploy/streamlit-community-cloud/deploy-your-app)
.

[Previous: Delete your app](/deploy/streamlit-community-cloud/manage-your-app/delete-your-app)
[Next: Favorite your app](/deploy/streamlit-community-cloud/manage-your-app/favorite-your-app)
_forum_
### Still have questions?
Our [forums](https://discuss.streamlit.io)
are full of helpful information and Streamlit experts.
---
# Update your email - Streamlit Docs
[](#update-your-email)
Update your email
==========================================
To update your email on Streamlit Community Cloud, you have two options: You can create a new account and merge your existing account into it, or you can use your GitHub account to update your email.
[](#option-1-create-a-new-account-and-merge-it)
Option 1: Create a new account and merge it
---------------------------------------------------------------------------------------------
Two Community Cloud accounts can't have the same GitHub account for source control. When you connect a GitHub account to a new Community Cloud account for source control, Community Cloud will automatically merge any existing account with the same source control.
Therefore, you can create a new account with the desired email and connect the same GitHub account to merge them together.
1. Create a new account with your new email.
2. Connect your GitHub account.
Your old and new accounts are now merged, and you have effectively changed your email address.
[](#option-2-use-your-github-account)
Option 2: Use your GitHub account
-------------------------------------------------------------------------
Alternatively, you can change the email on your GitHub account and then sign in to Community Cloud with GitHub.
1. Go to GitHub, and set your primary email address to your new email.
2. If you are currently signed in to Community Cloud, sign out.
3. Sign in to Community Cloud _using GitHub_.
If you are redirected to your workspace and you see your existing apps, you're done! Your email has been changed. To confirm your current email and GitHub account, click on your workspace name in the upper-left corner, and look at the bottom of the drop-down menu.
If you are redirected to an empty workspace and you see "**Workspaces _warning_**" in the upper-left corner, proceed to [Connect your GitHub account](/deploy/streamlit-community-cloud/get-started/connect-your-github-account)
. This can happen if you previously created an account with your new email but didn't connect a GitHub account to it.
_priority\_high_
#### Important
If you have multiple GitHub accounts, be careful. To avoid unexpected behavior, either use unique emails on each GitHub account or avoid signing in to Community Cloud using GitHub.
[Previous: Manage your GitHub connection](/deploy/streamlit-community-cloud/manage-your-account/manage-your-github-connection)
[Next: Delete your account](/deploy/streamlit-community-cloud/manage-your-account/delete-your-account)
_forum_
### Still have questions?
Our [forums](https://discuss.streamlit.io)
are full of helpful information and Streamlit experts.
---
# Share your app - Streamlit Docs
[](#share-your-app)
Share your app
====================================
Now that your app is deployed you can easily share it and collaborate on it. But first, let's take a moment and do a little joy dance for getting that app deployed! 🕺💃
Your app is now live at a fixed URL, so go wild and share it with whomever you want. Your app will inherit permissions from your GitHub repo, meaning that if your repo is private your app will be private and if your repo is public your app will be public. If you want to change that you can simply do so from the app settings menu.
You are only allowed one private app at a time. If you've deployed from a private repository, you will have to make that app public or delete it before you can deploy another app from a private repository. Only developers can change your app between public and private.
* [Make your app public or private](#make-your-app-public-or-private)
* [Share your public app](#share-your-public-app)
* [Share your private app](#share-your-private-app)
[](#make-your-app-public-or-private)
Make your app public or private
----------------------------------------------------------------------
If you deployed your app from a public repository, your app will be public by default. If you deployed your app from a private repository, you will need to make the app public if you want to freely share it with the community at large.
### [](#set-privacy-from-your-app-settings)
Set privacy from your app settings
1. Access your [App settings](/deploy/streamlit-community-cloud/manage-your-app/app-settings)
and go to the "**Sharing**" section.

2. Set your app's privacy under "Who can view this app." Select "**This app is public and searchable**" to make your app public. Select "**Only specific people can view this app**" to make your app private.

### [](#set-privacy-from-the-share-button)
Set privacy from the share button
1. From your app at `.streamlit.app`, click "**Share**" in the upper-right corner.

2. Toggle your app between public and private by clicking "**Make this app public**."

[](#share-your-public-app)
Share your public app
--------------------------------------------------
Once your app is public, just give anyone your app's URL and they view it! Streamlit Community Cloud has several convenient shortcuts for sharing your app.
### [](#share-your-app-on-social-media)
Share your app on social media
1. From your app at `.streamlit.app`, click "**Share**" in the upper-right corner.
2. Click "**Social**" to access convenient social media share buttons.

_star_
#### Tip
Use the social media sharing buttons to post your app on our forum! We'd love to see what you make and perhaps feature your app as our app of the month. 💖
### [](#invite-viewers-by-email)
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 signed 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**."

3. Invited users will get a direct link to your app in their inbox.

### [](#copy-your-apps-url)
Copy your app's URL
From your app click "**Share**" in the upper-right corner then click "**Copy link**."

### [](#add-a-badge-to-your-github-repository)
Add a badge to your GitHub repository
To help others find and play with your Streamlit app, you can add Streamlit's GitHub badge to your repo. Below is an enlarged example of what the badge looks like. Clicking on the badge takes you to—in this case—Streamlit's Roadmap.
[](https://roadmap.streamlit.app/)
Once you deploy your app, you can embed this badge right into your GitHub README.md by adding the following Markdown:
`[](https://.streamlit.app)`
_push\_pin_
#### Note
Be sure to replace `https://.streamlit.app` with the URL of your deployed app!
[](#share-your-private-app)
Share your private app
----------------------------------------------------
By default an app deployed from a private repository will be private to the developers in the workspace. A private app will not be visible to anyone else unless you grant them explicit permission. You can grant permission by adding them as a developer on GitHub or by adding them as a viewer on Streamlit Community Cloud.
Once you have added someone's email address to your app's viewer list, that person will be able to sign in and view your private app. If their email is associated with a Google account, they will be able to sign in with Google OAuth. Otherwise, they will be able to sign in with single-use, emailed links. Streamlit sends an email invitation with a link to your app every time you invite someone.
_priority\_high_
#### Important
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)
### [](#invite-viewers-from-the-share-button)
Invite viewers from the share button
1. From your app at `.streamlit.app`, click "**Share**" in the upper-right corner.

2. Enter the email to send an invitation to and click "**Invite**."

3. Invited users appear in the list below.

4. Invited users will get a direct link to your app in their inbox.

* To remove a viewer, simply access the share menu as above and click the _close_ next to their name.

### [](#invite-viewers-from-your-app-settings)
Invite viewers from your app settings
1. Access your [App settings](/deploy/streamlit-community-cloud/manage-your-app/app-settings)
and go to the "**Sharing**" section.

2. Add or remove users from the list of viewers. Click "**Save**."

[Previous: Manage your app](/deploy/streamlit-community-cloud/manage-your-app)
[Next: Embed your app](/deploy/streamlit-community-cloud/share-your-app/embed-your-app)
_forum_
### Still have questions?
Our [forums](https://discuss.streamlit.io)
are full of helpful information and Streamlit experts.
---
# Workspace settings - Streamlit Docs
[](#workspace-settings)
Workspace settings
============================================
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)
Access your workspace settings
--------------------------------------------------------------------
1. Sign in to [share.streamlit.io](https://share.streamlit.io)
.
2. In the upper-left corner, click on your workspace name.
3. In the drop-down menu, click "**Settings**."

[](#linked-accounts)
Linked accounts
--------------------------------------
The "**Linked accounts**" section shows your current email identity and source control account. To learn more, see [Manage your account](/deploy/streamlit-community-cloud/manage-your-account)
.

[](#limits)
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)
.

[](#support)
Support
----------------------
The "**Support**" section provides a convenient list of useful resources so you know where to go for help.

[Previous: Sign in & sign out](/deploy/streamlit-community-cloud/manage-your-account/sign-in-sign-out)
[Next: Manage your GitHub connection](/deploy/streamlit-community-cloud/manage-your-account/manage-your-github-connection)
_forum_
### Still have questions?
Our [forums](https://discuss.streamlit.io)
are full of helpful information and Streamlit experts.
---
# Sign in & sign out - Streamlit Docs
[](#sign-in--sign-out)
Sign in & sign out
===========================================
After you've created your account, you can sign in to [share.streamlit.io](https://share.streamlit.io)
as described by the following options.

[](#sign-in-with-google)
Sign in with Google
----------------------------------------------
1. Click "**Continue to sign-in**."
2. Click "**Continue with Google**."
3. Enter your Google account credentials and follow the prompts.
If your account is already linked to GitHub, you may be immediately prompted to sign in with GitHub.
[](#sign-in-with-github)
Sign in with GitHub
----------------------------------------------
1. Click "**Continue to sign-in**."
2. Click "**Continue with GitHub**."
3. Enter your GitHub credentials and follow the prompts.
_priority\_high_
#### Important
When you sign in with GitHub, Community Cloud will look for an account that uses the same email you have on your GitHub account. If such an account doesn't exist, Community Cloud will look for an account that uses your GitHub account for source control. In this latter instance, Community Cloud will update the email on your Community Cloud account to match the email on your GitHub account.
[](#sign-in-with-email)
Sign in with Email
--------------------------------------------
1. Click "**Continue to sign-in**."
2. In the "Email" field, enter your email address.
3. Click "**Continue**." (If prompted, verify you are human.)
4. Go to your email inbox, and copy your one-time, six-digit code. The code is valid for ten minutes.
5. Return to the authentication page, and enter your code. (If prompted, verify you are human.)
If your account is already linked to GitHub, you may be immediately prompted to sign in with GitHub.
[](#sign-out-of-your-account)
Sign out of your account
--------------------------------------------------------
From your workspace, click on your workspace name in the upper-left corner. Click "**Sign out**."

[Previous: Manage your account](/deploy/streamlit-community-cloud/manage-your-account)
[Next: Workspace settings](/deploy/streamlit-community-cloud/manage-your-account/workspace-settings)
_forum_
### Still have questions?
Our [forums](https://discuss.streamlit.io)
are full of helpful information and Streamlit experts.
---
# Rename or change your app's GitHub coordinates - Streamlit Docs
[](#rename-or-change-your-apps-github-coordinates)
Rename or change your app's GitHub coordinates
===================================================================================================
Streamlit Community Cloud identifies apps by their GitHub coordinates (owner, repository, branch, entrypoint file path). If you move or rename one of these coordinates without preparation, you will lose access to administer any associated app.
[](#delete-rename-redeploy)
Delete, rename, redeploy
------------------------------------------------------
If you need to rename your repository, move your entrypoint file, or otherwise change a deployed app's GitHub coordinates, do the following:
1. Delete your app.
2. Make your desired changes in GitHub.
3. Redeploy your app.
[](#regain-access-when-youve-already-made-changes-to-your-apps-github-coordinates)
Regain access when you've already made changes to your app's GitHub coordinates
--------------------------------------------------------------------------------------------------------------------------------------------------------------------
If you have changed a repository so that Community Cloud can no longer find your app on GitHub, your app will be missing or shown as view-only. View-only means that you can't edit, reboot, delete, or view settings for your app. You can only access analytics.
You may be able to regain control as follows:
1. Revert the change you made to your app so that Community Cloud can see the owner, repository, branch, and entrypoint file it expects.
2. Sign out of Community Cloud and GitHub.
3. Sign back in to Community Cloud and GitHub.
4. If you have regained access, delete your app. Proceed with your original change, and redeploy your app.
If this does not restore access to your app, please [contact Snowflake support](/knowledge-base/deploy/how-to-submit-a-support-case-for-streamlit-community-cloud)
for assistance. They can delete your disconnected apps so you can redeploy them. For the quickest help, please provide a complete list of your affected apps by URL.
[Previous: Reboot your app](/deploy/streamlit-community-cloud/manage-your-app/reboot-your-app)
[Next: Upgrade Python](/deploy/streamlit-community-cloud/manage-your-app/upgrade-python)
_forum_
### Still have questions?
Our [forums](https://discuss.streamlit.io)
are full of helpful information and Streamlit experts.
---
# Embed your app - Streamlit Docs
[](#embed-your-app)
Embed your app
====================================
Embedding Streamlit Community Cloud apps enriches your content by integrating interactive, data-driven applications directly within your pages. Whether you're writing a blog post, a technical document, or sharing resources on platforms like Medium, Notion, or even StackOverflow, embedding Streamlit apps adds a dynamic component to your content. This allows your audience to interact with your ideas, rather than merely reading about them or looking at screenshots.
Streamlit Community Cloud supports both [iframe](#embedding-with-iframes)
and [oEmbed](#embedding-with-oembed)
methods for embedding **public** apps. This flexibility enables you to share your apps across a wide array of platforms, broadening your app's visibility and impact. In this guide, we'll cover how to use both methods effectively to share your Streamlit apps with the world.
[](#embedding-with-iframes)
Embedding with iframes
----------------------------------------------------
Streamlit Community Cloud supports embedding **public** apps using the subdomain scheme. To embed a public app, add the query parameter `/?embed=true` to the end of the `*.streamlit.app` URL.
For example, say you want to embed the [30DaysOfStreamlit app](https://30days.streamlit.app/)
. The URL to include in your iframe is: `https://30days.streamlit.app/?embed=true`:
``
[Built with Streamlit 🎈](https://streamlit.io)
[Fullscreen _open\_in\_new_](https://30days.streamlit.app/?utm_medium=oembed)
_priority\_high_
#### Important
There will be no official support for embedding private apps.
In addition to allowing you to embed apps via iframes, the `?embed=true` query parameter also does the following:
* Removes the toolbar with the app menu icon (_more\_vert_).
* Removes the padding at the top and bottom of the app.
* Removes the footer.
* Removes the colored line from the top of the app.
For granular control over the embedding behavior, Streamlit allows you to specify one or more instances of the `?embed_options` query parameter (e.g. to show the toolbar, open the app in dark theme, etc). [Click here for a full list of Embed options.](#embed-options)
[](#embedding-with-oembed)
Embedding with oEmbed
--------------------------------------------------
Streamlit's oEmbed support allows for a simpler embedding experience. You can directly drop a Streamlit app's URL into a Medium, Ghost, or Notion page (or any of more than 700 content providers that supports oEmbed or [embed.ly](https://embed.ly/)
). The embedded app will automatically appear! This helps Streamlit Community Cloud apps seamlessly integrate into these platforms, improving the visibility and accessibility of your apps.
### [](#example)
Example
When creating content in a Notion page, Medium article, or Ghost blog, you only need to paste the app's URL and hit "**Enter**." The app will then render automatically at that spot in your content. You can use your undecorated app URL without the `?embed=true` query parameter.
`https://30days.streamlit.app/`
Here's an example of [@chrieke](https://github.com/chrieke)
's [Prettymapp app](https://chrieke-prettymapp-streamlit-prettymappapp-1k0qxh.streamlit.app/)
embedded in a Medium article:

_star_
#### Tip
Ensure the platform hosting the embedded Streamlit app supports oEmbed or [embed.ly](https://embed.ly/)
.
### [](#key-sites-for-oembed)
Key Sites for oEmbed
oEmbed should work out of the box for several platforms including but not limited to:
* [Medium](https://medium.com/)
* [Notion](https://notion.so/)
* [Looker](https://www.looker.com/)
* [Tableau](https://www.tableau.com/)
* [Ghost](https://ghost.org/)
* [Discourse](https://www.discourse.org/)
* [StackOverflow](https://stackoverflow.com/)
* [W3](https://www.w3schools.com/)
* [Reddit](https://www.reddit.com/)
Please check the specific platform's documentation to verify support for oEmbed.
### [](#iframe-versus-oembed)
iframe versus oEmbed
The only noteworthy differences between the methods is that iframing allows you to customize the app's embedding behavior (e.g. showing the toolbar, opening the app in dark theme, etc) using the various `?embed_options` described in the next section.
[](#embed-options)
Embed options
----------------------------------
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`](/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:
1. Show the toolbar at the top right of the app which includes the app menu (_more\_vert_), running man, and link to GitHub.
`/?embed=true&embed_options=show_toolbar`
2. Show padding at the top and bottom of the app.
`/?embed=true&embed_options=show_padding`
3. Show the footer reading "Made with Streamlit." (This doesn't apply to Streamlit versions 1.29.0 and later since the footer was removed from the library.)
`/?embed=true&embed_options=show_footer`
4. Show the colored line at the top of the app.
`/?embed=true&embed_options=show_colored_line`
5. Hide the "skeleton" that appears while an app is loading.
`/?embed=true&embed_options=hide_loading_screen`
6. Disable scrolling for the main body of the app. (The sidebar will still be scrollable.)
`/?embed=true&embed_options=disable_scrolling`
7. Open the app with light theme.
`/?embed=true&embed_options=light_theme`
8. Open the app with dark theme.
`/?embed=true&embed_options=dark_theme`
You can also combine the params:
`/?embed=true&embed_options=show_toolbar&embed_options=show_padding&embed_options=show_footer&embed_options=show_colored_line&embed_options=disable_scrolling`
### [](#build-an-embed-link)
Build an embed link
You can conveniently build an embed link for your app — right from your app!
1. From your app at `.streamlit.app`, click "**Share**" in the upper-right corner.
2. Click "**Embed**" to access a list of selectable embed options.

3. Select your embed options and click "**Get embed link**" to copy the embed link to your clipboard.

[Previous: Share your app](/deploy/streamlit-community-cloud/share-your-app)
[Next: Search indexability](/deploy/streamlit-community-cloud/share-your-app/indexability)
_forum_
### Still have questions?
Our [forums](https://discuss.streamlit.io)
are full of helpful information and Streamlit experts.
---
# Upgrade your app's Streamlit version on Streamlit Community Cloud - Streamlit Docs
[](#upgrade-your-apps-streamlit-version-on-streamlit-community-cloud)
Upgrade your app's Streamlit version on Streamlit Community Cloud
=========================================================================================================================================
Want to use a cool new Streamlit feature but your app on Streamlit Community Cloud is running an old version of the Streamlit library? If that's you, don't worry! Here's how to upgrade your app's Streamlit version, based on how you manage your [app dependencies](/deploy/streamlit-community-cloud/deploy-your-app/app-dependencies)
:
[](#no-dependency-file)
No dependency file
--------------------------------------------
When there is no dependencies file in your repository, your app will use the lastest Streamlit version that existed when it was last rebooted. In this case, simply [reboot your app](/deploy/streamlit-community-cloud/manage-your-app/reboot-your-app)
and Community Cloud will install the latest version.
You may want to avoid getting into this situation if your app depends on a specific version of Streamlit. That is why we encourage you to use a dependency file and pin your desired version of Streamlit.
[](#with-a-dependency-file)
With a dependency file
----------------------------------------------------
When your app includes a dependency file, reboot your app or change your dependency file as follows:
* If Streamlit is not included in your dependency file, reboot the app as described above.
Note that we don't recommend having an incomplete dependency file since `pip` won't be able to include `streamlit` when resolving compatible versions of your dependencies.
* If Streamlit is included in your dependency file, but the version is not pinned or capped, reboot the app as described above.
When Community Cloud reboots your app, it will re-resolve your dependency file. Your app will then have the latest version of all dependencies that are consistent with your dependency file.
* If Streamlit is included in your dependency file, and the version is pinned (e.g., `streamlit==1.37.0`), update your dependency file.
When you commit a change to your dependency file in your repository, Community Cloud will detect the change and automatically resolve the new dependencies. This is how you add, remove, or change all Python dependencies in general. You don't need to manually reboot your app, but you can if you want to.
[Previous: Upgrade Python](/deploy/streamlit-community-cloud/manage-your-app/upgrade-python)
[Next: Share your app](/deploy/streamlit-community-cloud/share-your-app)
_forum_
### Still have questions?
Our [forums](https://discuss.streamlit.io)
are full of helpful information and Streamlit experts.
---
# Upgrade your app's Python version on Community Cloud - Streamlit Docs
[](#upgrade-your-apps-python-version-on-community-cloud)
Upgrade your app's Python version on Community Cloud
===============================================================================================================
Dependencies within Python can be upgraded in place by simply changing your environment configuration file (typically `requirements.txt`). However, Python itself can't be changed after deployment.
When you deploy an app, you can select the version of Python through the "**Advanced settings**" dialog. After you have deployed an app, you must delete it and redeploy it to change the version of Python it uses.
1. Take note of your app's settings:
* Current, custom subdomain.
* GitHub coordinates (repository, branch, and entrypoint file path).
* Secrets.
When you delete an app, its custom subdomain is immediately available for reuse.
2. [Delete your app](/deploy/streamlit-community-cloud/manage-your-app/delete-your-app)
.
3. [Deploy your app](/deploy/streamlit-community-cloud/deploy-your-app)
.
1. On the deployment page, select your app's GitHub coordinates.
2. Set your custom domain to match your deleted instance.
3. Click "**Advanced settings**."
4. Choose your desired version of Python.
5. Optional: If your app had secrets, re-enter them.
6. Click "**Save**."
7. Click "**Deploy**."
In a few minutes, Community Cloud will redirect you to your redployed app.
[Previous: Rename your app in GitHub](/deploy/streamlit-community-cloud/manage-your-app/rename-your-app)
[Next: Upgrade Streamlit](/deploy/streamlit-community-cloud/manage-your-app/upgrade-streamlit)
_forum_
### Still have questions?
Our [forums](https://discuss.streamlit.io)
are full of helpful information and Streamlit experts.
---
# Manage your app - Streamlit Docs
[](#manage-your-app)
Manage your app
======================================
You can manage your deployed app from your workspace at [share.streamlit.io](https://share.streamlit.io)
or directly from `.streamlit.app`. You can view, deploy, delete, reboot, or favorite an app.
[](#manage-your-app-from-your-workspace)
Manage your app from your workspace
------------------------------------------------------------------------------
Streamlit Community Cloud is organized into workspaces, which automatically group your apps according to their repository's owner in GitHub. Your workspace is indicated in the upper-left corner. For more information, see [Switching workspaces](/deploy/streamlit-community-cloud/get-started/explore-your-workspace#switching-workspaces)
.
To deploy or manage any app, always switch to the workspace matching the repository's owner first.
### [](#sort-your-apps)
Sort your apps
If you have many apps in your workspace, you can pin apps to the top by marking them as favorite (_star_). For more information, see [Favorite your app](/deploy/streamlit-community-cloud/manage-your-app/favorite-your-app)
.
### [](#app-overflow-menus)
App overflow menus
Each app has a menu accessible from the overflow icon (_more\_vert_) to the right.
* **Edit with Codespaces** — See [Edit your app with GitHub Codespaces](/deploy/streamlit-community-cloud/manage-your-app/edit-your-app#edit-your-app-with-github-codespaces)
* **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)
* **Analytics** — See [App analytics](/deploy/streamlit-community-cloud/manage-your-app/app-analytics)
* **Settings** — See [App settings](/deploy/streamlit-community-cloud/manage-your-app/app-settings)

If you have view-only access to an app, all options in the app's menu will be disabled except analytics.

[](#manage-your-app-directly-from-your-app)
Manage your app directly from your app
------------------------------------------------------------------------------------
You can manage your deployed app directly from the app itself! Just make sure you are signed in to Community Cloud, and then visit your app.
### [](#cloud-logs)
Cloud logs
1. From your app at `.streamlit.app`, click "**Manage app**" in the lower-right corner.

2. Once you've clicked on "**Manage app**", you will be able to view your app's logs. This is your primary place to troubleshoot any issues with your app.

3. You can access more developer options by clicking the overflow icon (_more\_vert_) at the bottom of your Cloud logs. To conveniently download your logs, click "**Download log**."

Other options accessible from Cloud logs are:
* **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](https://discuss.streamlit.io/)
!

### [](#app-chrome)
App chrome
From your app at `.streamlit.app`, you can always access the [app chrome](/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.

[](#manage-your-app-in-github)
Manage your app in GitHub
----------------------------------------------------------
### [](#update-your-app)
Update your app
Your GitHub repository is the source for your app, so that means that any time you push an update to your repository you'll see it reflected in the app in almost real time. Try it out!
Streamlit also smartly detects whether you touched your dependencies, in which case it will automatically do a full redeploy for you—which will take a little more time. But since most updates don't involve dependency changes, you should usually see your app update in real time.
### [](#add-or-remove-dependencies)
Add or remove dependencies
To add or remove dependencies at any point, just update `requirements.txt` (Python dependenciess) or `packages.txt` (Linux dependencies), and commit the changes to your repository on GitHub. Community Cloud detects the change in your dependencies and automatically triggers (re)installation.
It is best practice to pin your Streamlit version in `requirements.txt`. Otherwise, the version may be auto-upgraded at any point without your knowledge, which could lead to undesired results (e.g. when we deprecate a feature in Streamlit).
[](#app-resources-and-limits)
App resources and limits
--------------------------------------------------------
### [](#resource-limits)
Resource limits
All Community Cloud users have access to the same resources and are subject to the same limits. These limits may change at any time without notice. If your app meets or exceeds its limits, it may slow down from throttling or become nonfunctional. The limits as of February 2024 are approximately as follows:
* CPU: 0.078 cores minimum, 2 cores maximum
* Memory: 690MB minimum, 2.7GBs maximum
* Storage: No minimum, 50GB maximum
Symptoms that your app is running out of resources include the following:
* Your app is running slowly.
* Your app displays "🤯 This app has gone over its resource limits."
* Your app displays "😦 Oh no."
### [](#good-for-the-world)
Good for the world
Streamlit offers increased resources for apps with good-for-the-world use cases. Generally, these apps are used by an educational institution or nonprofit organization, are part of an open-source project, or benefit the world in some way. If your app is **not** primarily used by a for-profit company you can [apply for increased resources](https://info.snowflake.com/streamlit-resource-increase-request.html)
.
### [](#optimizing-your-app)
Optimizing your app
If your app is running slow or showing the error pages mentioned above, we first highly recommend going through and implementing the suggestions in the following blog posts to prevent your app from hitting the resource limits and to detect if your Streamlit app leaks memory:
* [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 your app exceeds its resource limits, developers and viewers alike will see "😦 Oh no."

If see "😦 Oh no." when viewing your app, first check your Cloud logs for any specific errors. If there are no errors in your Cloud logs you are likely dealing with a resource issue.
#### [](#developer-view)
Developer view
If you are signed in to a developer account for an app over its limits, you can access "**Manage app**" from the lower-right corner of the app to reboot it and clear its memory. "**Manage app**" will be red and have a warning icon (_error_).

### [](#app-hibernation)
App hibernation
All apps without traffic for one weekday will go to sleep. The system checks apps for inactivity throughout each day as follows:
* Tuesday through Friday: All apps without traffic for 24 hours (one day) will go to sleep.
* Saturday through Monday: All apps without traffic for 72 hours (three days) will go to sleep.
Community Cloud hibernates apps to conserve resources and allow the best communal use of the platform. To keep your app awake, simply visit the app or commit to your app's repository, even if it's an empty commit!
When someone visits a sleeping app, they will see the sleeping page:

To wake the app up, click "**Yes, get this app back up!**" This can be done by _anyone_ who has access to view the app, not just the app developer!
You can see which of your apps are asleep from your workspace. Sleeping apps have a moon icon (_bedtime_) to the right.

[Previous: Deploy your app](/deploy/streamlit-community-cloud/deploy-your-app)
[Next: App analytics](/deploy/streamlit-community-cloud/manage-your-app/app-analytics)
_forum_
### Still have questions?
Our [forums](https://discuss.streamlit.io)
are full of helpful information and Streamlit experts.
---
# App analytics - Streamlit Docs
[](#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 at the last 20 viewers).
* A relative timestamp of each unique viewer's last visit.

[](#access-your-app-analytics)
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)
.
### [](#access-app-analytics-from-your-workspace)
Access app analytics from your workspace
From your workspace at [share.streamlit.io](https://share.streamlit.io)
, click the overflow icon (_more\_vert_) next to your app. Click "**Analytics**."

### [](#access-app-analytics-from-your-cloud-logs)
Access app analytics from your Cloud logs
From your app at `.streamlit.app`, click "**Manage app**" in the lower-right corner.

Click the overflow menu icon (_more\_vert_) and click "**Analytics**."

[](#app-viewers)
App viewers
------------------------------
For public apps, we anonymize all viewers outside your workspace to protect their privacy and display anonymous viewers as random pseudonyms. You'll still be able to see the identities of fellow members in your workspace, including any viewers you've invited (once they've accepted).
_priority\_high_
#### Important
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.
Meanwhile, for private apps where you control who has access, you will be able to see the specific users who recently viewed your apps.
Additionally, you may occasionally see anonymous users in a private app. Rest assured, these anonymous users _do_ have authorized view access granted by you or your workspace members.
Common reasons why users show up anonymously are:
* The app was previously public.
* The given viewer viewed the app in April 2022, when the Streamlit team was honing user identification for this feature.
See Streamlit's general [Privacy Notice](https://streamlit.io/privacy-policy)
.
[Previous: Manage your app](/deploy/streamlit-community-cloud/manage-your-app)
[Next: App settings](/deploy/streamlit-community-cloud/manage-your-app/app-settings)
_forum_
### Still have questions?
Our [forums](https://discuss.streamlit.io)
are full of helpful information and Streamlit experts.
---
# Reboot your app - Streamlit Docs
[](#reboot-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 redeploy. Anyone visiting your app will see "Your app is in the oven" during a reboot.
Rebooting your app on 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)
.
### [](#reboot-your-app-from-your-workspace)
Reboot your app from your workspace
1. From your workspace at [share.streamlit.io](https://share.streamlit.io)
, click the overflow icon (_more\_vert_) next to your app. Click "**Reboot**."

2. A confirmation will display. Click "**Reboot**."

### [](#reboot-your-app-from-your-cloud-logs)
Reboot your app from your Cloud logs
1. From your app at `.streamlit.app`, click "**Manage app**" in the lower-right corner.

2. Click the overflow menu icon (_more\_vert_) and click "**Reboot app**."

3. A confirmation will display. Click "**Reboot**."

[Previous: Favorite your app](/deploy/streamlit-community-cloud/manage-your-app/favorite-your-app)
[Next: Rename your app in GitHub](/deploy/streamlit-community-cloud/manage-your-app/rename-your-app)
_forum_
### Still have questions?
Our [forums](https://discuss.streamlit.io)
are full of helpful information and Streamlit experts.
---
# Delete your app - Streamlit Docs
[](#delete-your-app)
Delete your app
======================================
If you need to delete your app, it's simple and easy. There are several cases where you may need to delete your app:
* You have finished playing around with an example app.
* You want to deploy from a private repository but already have a private app.
* You want to [change the Python version](/deploy/streamlit-community-cloud/manage-your-app/upgrade-python)
for your app.
* You want to [rename your repository](/deploy/streamlit-community-cloud/manage-your-app/rename-your-app)
or move your entrypoint file.
If you delete your app and intend to immediately redploy it, your custom subdomain should be immediately available for reuse. Read more about data deletion in [Streamlit trust and security](/deploy/streamlit-community-cloud/get-started/trust-and-security#data-deletion)
.
You can delete your app:
* [From your workspace](#delete-your-app-from-your-workspace)
.
* [From your Cloud logs](#delete-your-app-from-your-cloud-logs)
.
### [](#delete-your-app-from-your-workspace)
Delete your app from your workspace
1. From your workspace at [share.streamlit.io](https://share.streamlit.io)
, click the overflow icon (_more\_vert_) next to your app. Click "**Delete**."

2. A confirmation will display. Enter the required confirmation string and click "**Delete**."

### [](#delete-your-app-from-your-cloud-logs)
Delete your app from your Cloud logs
1. From your app at `.streamlit.app`, click "**Manage app**" in the lower-right corner.

2. Click the overflow menu icon (_more\_vert_) and click "**Delete app**."

3. A confirmation will display. Enter the required confirmation string and click "**Delete**."

[Previous: App settings](/deploy/streamlit-community-cloud/manage-your-app/app-settings)
[Next: Edit your app](/deploy/streamlit-community-cloud/manage-your-app/edit-your-app)
_forum_
### Still have questions?
Our [forums](https://discuss.streamlit.io)
are full of helpful information and Streamlit experts.
---
# Favorite your app - Streamlit Docs
[](#favorite-your-app)
Favorite your app
==========================================
Streamlit Community Cloud supports a "favorite" feature that lets you quickly access your apps from your workspace. Favorited apps appear at the top of their workspace with a yellow star (_star_) beside them. You can favorite and unfavorite apps in any workspace to which you have access as a developer or invited viewer.

_push\_pin_
#### Note
Favorites are specific to your account. Other members of your workspace cannot see which apps you have favorited.
[](#favoriting-and-unfavoriting-your-app)
Favoriting and unfavoriting your app
--------------------------------------------------------------------------------
You can favorite your app:
* [From your workspace](#favorite-your-app-from-your-workspace)
.
* [From your app](#favorite-your-app-from-your-app-toolbar)
!
### [](#favorite-your-app-from-your-workspace)
Favorite your app from your workspace
1. From your workspace at [share.streamlit.io](https://share.streamlit.io)
, hover over your app.
If your app is not yet favorited, a star outline (_star\_border_) will appear on hover.
2. Click on the star (_star\_border_/_star_) next to your app name to toggle its favorited status.
### [](#favorite-your-app-from-your-app-toolbar)
Favorite your app from your app toolbar
From your app at `.streamlit.app`, click the star (_star\_border_/_star_) in the upper-right corner to toggle your app's favorited status.

[Previous: Edit your app](/deploy/streamlit-community-cloud/manage-your-app/edit-your-app)
[Next: Reboot your app](/deploy/streamlit-community-cloud/manage-your-app/reboot-your-app)
_forum_
### Still have questions?
Our [forums](https://discuss.streamlit.io)
are full of helpful information and Streamlit experts.
---
# Deployment concepts - Streamlit Docs
[](#deployment-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!
[_build\_circle_](/deploy/concepts/dependencies)
[Dependencies.](/deploy/concepts/dependencies)
Understand the basics of configuring your deployment environment.
[_password_](/deploy/concepts/secrets)
[Secrets.](/deploy/concepts/secrets)
Understand the basics of secret management.
[Previous: Deploy](/deploy)
[Next: Dependencies](/deploy/concepts/dependencies)
_forum_
### Still have questions?
Our [forums](https://discuss.streamlit.io)
are full of helpful information and Streamlit experts.
---
# Status and limitations - Streamlit Docs
[](#status-and-limitations-of-community-cloud)
Status and limitations of Community Cloud
==========================================================================================
[](#community-cloud-status)
Community Cloud Status
----------------------------------------------------
You can view the current status of Community Cloud at [streamlitstatus.com](https://www.streamlitstatus.com/)
.
[](#github-oauth-scope)
GitHub OAuth scope
--------------------------------------------
To deploy your app, Streamlit requires access to your app's source code in GitHub and the ability to manage the public keys associated with your repositories. The default GitHub OAuth scopes are sufficient to work with apps in public GitHub repositories. However, to access your private repositories, we create a read-only [GitHub Deploy Key](https://docs.github.com/en/free-pro-team@latest/developers/overview/managing-deploy-keys#deploy-keys)
and then access your repo using an SSH key. When we create this key, GitHub notifies repo admins of the creation as a security measure.
Streamlit requires the additional `repo` OAuth scope from GitHub to work with your private repos and manage deploy keys. We recognize that the `repo` scope provides Streamlit with extra permissions that we do not really need and which, as people who prize security, we'd rather not even be granted. This was the permission model available from GitHub when Community Cloud was created. However, we are working on adopting the new GitHub permission model to reduce uneeded permissions.
### [](#developer-permissions)
Developer permissions
Because of the OAuth limitations noted above, a developer must have administrative permissions to a repository to deploy apps from it.
[](#repository-file-structure)
Repository file structure
----------------------------------------------------------
You can deploy multiple apps from your repository, and your entrypoint file(s) may be anywhere in your directory structure. However, Community Cloud initializes all apps from the root of your repository, even if the entrypoint file is in a subdirectory. This has the following consequences:
* Community Cloud only recognizes one `.streamlit/configuration.toml` file at the root (of each branch) of your repository.
* You must declare image, video, and audio file paths for Streamlit commands relative to the root of your repository. For example, `st.image`, `st.logo`, and the `page_icon` parameter in `st.set_page_config` expect file locations relative to your working directory (i.e. where you execute `streamlit run`).
[](#linux-environments)
Linux environments
--------------------------------------------
Community Cloud is built on Debian Linux.
* Community Cloud uses Debian 11 ("bullseye"). To browse available packages that can be installed, see the [package list](https://packages.debian.org/bullseye/)
.
* All file paths must use forward-slash path separators.
[](#python-environments)
Python environments
----------------------------------------------
* You cannot mix and match Python package managers for a single app. Community Cloud configures your app's Python environment based on the first environment configuration file it finds. For more information, see [Other Python package managers](/deploy/streamlit-community-cloud/deploy-your-app/app-dependencies#other-python-package-managers)
.
* We recommend that you use the latest version of Streamlit to ensure full Community Cloud functionality. Be sure to take note of Streamlit's [current requirements](https://github.com/streamlit/streamlit/blob/develop/lib/setup.py)
for package compatibility when planning your environment, especially `protobuf>=3.20,<6`.
* If you pin `streamlit< 1.20.0`, you must also pin `altair<5`. Earlier versions of Streamlit did not correctly restrict Altair's version. A workaround script running on Community Cloud will forcibly install `altair<5` if a newer version is detected. This could unintentionally upgrade Altair's dependencies in violation of your environment configuration. Newer versions of Streamlit support Altair version 5.
* Community Cloud only supports released versions of Python that are still receiving security updates. You may not use end-of-life, prerelease, or feature versions of Python. For more information, see [Status of Python versions](https://devguide.python.org/versions/)
.
[](#configuration)
Configuration
----------------------------------
The following configuration options are set within Community Cloud and will override any contrary setting in your `config.toml` file:
`[client] showErrorDetails = false [runner] fastReruns = true [server] runOnSave = true enableXsrfProtection = true [browser] gatherUsageStats = true`
[](#ip-addresses)
IP addresses
--------------------------------
If you need to whitelist IP addresses for a connection, Community Cloud is currently served from the following IP addresses:
_priority\_high_
#### Warning
These IP addresses may change at any time without notice.
35.230.127.150
35.203.151.101
34.19.100.134
34.83.176.217
35.230.58.211
35.203.187.165
35.185.209.55
34.127.88.74
34.127.0.121
35.230.78.192
35.247.110.67
35.197.92.111
34.168.247.159
35.230.56.30
34.127.33.101
35.227.190.87
35.199.156.97
34.82.135.155
[](#other-limitations)
Other limitations
------------------------------------------
* When you print something to the Cloud logs, you may need to do a `sys.stdout.flush()` before it shows up.
* Community Cloud hosts all apps in the United States. This is currently not configurable.
* Community Cloud rate limits app updates from GitHub to no more than five per minute.
[Previous: Manage your account](/deploy/streamlit-community-cloud/manage-your-account)
[Next: Snowflake](/deploy/snowflake)
_forum_
### Still have questions?
Our [forums](https://discuss.streamlit.io)
are full of helpful information and Streamlit experts.
---
# SEO and search indexability - Streamlit Docs
[](#seo-and-search-indexability)
SEO and search indexability
==============================================================
When you deploy a public app to Streamlit Community Cloud, it is automatically indexed by search engines like Google and Bing on a weekly basis. 🎈 This means that anyone can find your app by [searching for its custom subdomain](https://www.google.com/search?q=traingenerator.streamlit.app)
(e.g. "traingenerator.streamlit.app") or by searching for the app's title.
[](#get-the-most-out-of-app-indexability)
Get the most out of app indexability
--------------------------------------------------------------------------------
Here are some tips to help you get the most out of app indexability:
1. [Make sure your app is public](#make-sure-your-app-is-public)
2. [Choose a custom subdomain early](#choose-a-custom-subdomain-early)
3. [Choose a descriptive app title](#choose-a-descriptive-app-title)
4. [Customize your app's meta description](#customize-your-apps-meta-description)
### [](#make-sure-your-app-is-public)
Make sure your app is public
All public apps hosted on 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)
Choose a custom subdomain early
Community Cloud automatically generates a subdomain for your app if you do not choose one. However, you can change your subdomain at any time! Custom subdomains modify your app URLs to reflect your app content, personal branding, or whatever you’d like. To learn how to change your app's subdomain, see [View or change your app's URL](/deploy/streamlit-community-cloud/manage-your-app/app-settings#view-or-change-your-apps-url)
.
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."
We recommend choosing a custom subdomain when you deploy your app. This ensures that your app is indexed by search engines using your custom subdomain, rather than the automatically generated one. If you choose a custom subdomain later, your app may be indexed multiple times—once using the default subdomain and once using your custom subdomain. In this case, your old URL will result in a 404 error which can confuse users who are searching for your app.
### [](#choose-a-descriptive-app-title)
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`](/develop/api-reference/configuration/st.set_page_config)
parameter `page_title` to a custom string. For example:
`st.set_page_config(page_title="Traingenerator")`
This will change the meta title of your app to "Traingenerator." This makes it easier for people to find your app by searching for "Traingenerator" or "train generator streamlit app":

Google search results for "train generator streamlit app"
### [](#customize-your-apps-meta-description)
Customize your app's meta description
Meta descriptions are the short descriptions that appear in search engine results. Search engines use the meta description to help users understand what your app is about.
From our observations, search engines seem to favor the content in both `st.header` and `st.text` over `st.title`. If you put a description at the top of your app under `st.header` or `st.text`, there’s a good chance search engines will use this for the meta description.
[](#what-does-my-indexed-app-look-like)
What does my indexed app look like?
-----------------------------------------------------------------------------
If you're curious about what your app looks like in search engine results, you can type the following into Google Search:
`site:.streamlit.app`
Example: `site:traingenerator.streamlit.app`

Google search results for "site:traingenerator.streamlit.app"
[](#what-if-i-dont-want-my-app-to-be-indexed)
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](/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, 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.
[Previous: Embed your app](/deploy/streamlit-community-cloud/share-your-app/embed-your-app)
[Next: Share previews](/deploy/streamlit-community-cloud/share-your-app/share-previews)
_forum_
### Still have questions?
Our [forums](https://discuss.streamlit.io)
are full of helpful information and Streamlit experts.
---
# Managing dependencies when deploying your app - Streamlit Docs
[](#managing-dependencies-when-deploying-your-app)
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)
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)
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-requirementstxt)
`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](https://docs.python.org/3/py-modindex.html)
like `math`, `random`, or `distutils` in your `requirements.txt` file. These are a part of Python and aren't installed separately.
_star_
#### Tip
Since dependencies may rely on a specific version of Python, always be aware of the Python version used in your development environment, and select the same version for your deployment environment.
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.
`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:
`streamlit pandas numpy`
If you needed to specify certain versions, another valid example would be:
`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.
[Previous: Concepts](/deploy/concepts)
[Next: Secrets](/deploy/concepts/secrets)
_forum_
### Still have questions?
Our [forums](https://discuss.streamlit.io)
are full of helpful information and Streamlit experts.
---
# Share previews - Streamlit Docs
[](#share-previews)
Share previews
====================================
Social media sites generate a card with a title, preview image, and description when you share a link. This feature is called a "share preview." In the same way, when you share a link to a public Streamlit app on social media, a share preview is also generated. Here's an example of a share preview for a public Streamlit app posted on Twitter:

Share preview for a public Streamlit app
_push\_pin_
#### Note
Share previews are generated only for public apps deployed on Streamlit Community Cloud.
[](#titles)
Titles
--------------------
The title is the text that appears at the top of the share preview. The text also appears in the browser tab when you visit the app. You should set the title to something that will make sense to your app's audience and describe what the app does. It is best practice to keep the title concise, ideally under 60 characters.
There are two ways to set the title of a share preview:
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.:
`import streamlit as st st.set_page_config(page_title="My App") # ... rest of your app`
2. If you don't set the `page_title` parameter, the title of the share preview will be the name of your app's GitHub repository. For example, the default title for an app hosted on GitHub at [github.com/jrieke/traingenerator](https://github.com/jrieke/traingenerator)
will be "traingenerator".
[](#descriptions)
Descriptions
--------------------------------
The description is the text that appears below the title in the share preview. The description should summarize what the app does and ideally should be under 100 characters.
Streamlit pulls the description from the README in the app's GitHub repository. If there is no README, the description will default to:
_This app was built in Streamlit! Check it out and visit [https://streamlit.io](https://streamlit.io)
for more awesome community apps. 🎈_

Default share preview when a description is missing
If you want your share previews to look great and want users to share your app and click on your links, you should write a good description in the README of your app’s GitHub repository.
[](#preview-images)
Preview images
------------------------------------
Streamlit Community Cloud takes a screenshot of your app once a day and uses it as the preview image, unlike titles and descriptions which are pulled directly from your app's code or GitHub repository. This screenshot may take up to 24 hours to update.
### [](#switching-your-app-from-public-to-private)
Switching your app from public to private
If you initially made your app public and later decided to make it private, we will stop generating share previews for the app. However, it may take up to 24 hours for the share previews to stop appearing.
[Previous: Search indexability](/deploy/streamlit-community-cloud/share-your-app/indexability)
[Next: Manage your account](/deploy/streamlit-community-cloud/manage-your-account)
_forum_
### Still have questions?
Our [forums](https://discuss.streamlit.io)
are full of helpful information and Streamlit experts.
---
# Managing secrets when deploying your app - Streamlit Docs
[](#managing-secrets-when-deploying-your-app)
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)
.
[Previous: Dependencies](/deploy/concepts/dependencies)
[Next: Streamlit Community Cloud](/deploy/streamlit-community-cloud)
_forum_
### Still have questions?
Our [forums](https://discuss.streamlit.io)
are full of helpful information and Streamlit experts.
---
# Deployment tutorials - Streamlit Docs
[](#deployment-tutorials)
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:
[\
\
##### Streamlit Community Cloud](/deploy/streamlit-community-cloud/get-started)
[\
\
##### Docker](/deploy/tutorials/docker)
[\
\
##### Kubernetes](/deploy/tutorials/kubernetes)
While we work on official Streamlit deployment guides for other hosting providers, here are some user-submitted tutorials for different cloud services:
* [How to Deploy Streamlit to a Free **Amazon EC2** instance](https://towardsdatascience.com/how-to-deploy-a-streamlit-app-using-an-amazon-free-ec2-instance-416a41f69dc3)
, by Rahul Agarwal.
* [Host Streamlit on **Azure**](https://towardsdatascience.com/deploying-a-streamlit-web-app-with-azure-app-service-1f09a2159743)
, by Richard Peterson.
* [How to deploy Streamlit apps to **Google App Engine**](https://dev.to/whitphx/how-to-deploy-streamlit-apps-to-google-app-engine-407o)
, by [Yuichiro Tachibana (Tsuchiya)](https://discuss.streamlit.io/u/whitphx/summary)
.
* [Host Streamlit on **Heroku**](https://towardsdatascience.com/quickly-build-and-deploy-an-application-with-streamlit-988ca08c7e83)
, by Maarten Grootendorst.
* [Deploy Streamlit on **Ploomber Cloud**](https://docs.cloud.ploomber.io/en/latest/apps/streamlit.html)
, by Ido Michael.
* [Host Streamlit on **21YunBox**](https://www.21yunbox.com/docs/#/deploy-streamlit)
, by Toby Lei.
* [Deploy a Streamlit App on **Koyeb**](https://www.koyeb.com/docs/deploy/streamlit)
, by Justin Ellingwood.
* [Community-supported deployment wiki](https://discuss.streamlit.io/t/streamlit-deployment-guide-wiki/5099)
.
[Previous: Snowflake](/deploy/snowflake)
[Next: Docker](/deploy/tutorials/docker)
_forum_
### Still have questions?
Our [forums](https://discuss.streamlit.io)
are full of helpful information and Streamlit experts.
---
# Deploy Streamlit using Docker - Streamlit Docs
[](#deploy-streamlit-using-docker)
Deploy Streamlit using Docker
==================================================================
[](#introduction)
Introduction
--------------------------------
So you have an amazing app and you want to start sharing it with other people, what do you do? You have a few options. First, where do you want to run your Streamlit app, and how do you want to access it?
* **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](/deploy/tutorials/kubernetes)
.
[](#prerequisites)
Prerequisites
----------------------------------
1. [Install Docker Engine](#install-docker-engine)
2. [Check network port accessibility](#check-network-port-accessibility)
### [](#install-docker-engine)
Install Docker Engine
If you haven't already done so, install [Docker](https://docs.docker.com/engine/install/#server)
on your server. Docker provides `.deb` and `.rpm` packages from many Linux distributions, including:
* [Debian](https://docs.docker.com/engine/install/debian/)
* [Ubuntu](https://docs.docker.com/engine/install/ubuntu/)
Verify that Docker Engine is installed correctly by running the `hello-world` Docker image:
`sudo docker run hello-world`
_star_
#### Tip
Follow Docker's official [post-installation steps for Linux](https://docs.docker.com/engine/install/linux-postinstall/)
to run Docker as a non-root user, so that you don't have to preface the `docker` command with `sudo`.
### [](#check-network-port-accessibility)
Check network port accessibility
As you and your users are behind your corporate VPN, you need to make sure all of you can access a certain network port. Let's say port `8501`, as it is the default port used by Streamlit. Contact your IT team and request access to port `8501` for you and your users.
[](#create-a-dockerfile)
Create a Dockerfile
----------------------------------------------
Docker builds images by reading the instructions from a `Dockerfile`. A `Dockerfile` is a text document that contains all the commands a user could call on the command line to assemble an image. Learn more in the [Dockerfile reference](https://docs.docker.com/engine/reference/builder/)
. The [docker build](https://docs.docker.com/engine/reference/commandline/build/)
command builds an image from a `Dockerfile`. The [docker run](https://docs.docker.com/engine/reference/commandline/run/)
command first creates a container over the specified image, and then starts it using the specified command.
Here's an example `Dockerfile` that you can add to the root of your directory. i.e. in `/app/`
`# app/Dockerfile FROM python:3.9-slim WORKDIR /app RUN apt-get update && apt-get install -y \ build-essential \ curl \ software-properties-common \ git \ && rm -rf /var/lib/apt/lists/* RUN git clone https://github.com/streamlit/streamlit-example.git . RUN pip3 install -r requirements.txt EXPOSE 8501 HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health ENTRYPOINT ["streamlit", "run", "streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"]`
### [](#dockerfile-walkthrough)
Dockerfile walkthrough
Let’s walk through each line of the Dockerfile :
1. A `Dockerfile` must start with a [`FROM`](https://docs.docker.com/engine/reference/builder/#from)
instruction. It sets the [Base Image](https://docs.docker.com/glossary/#base-image)
(think OS) for the container:
`FROM python:3.9-slim`
Docker has a number of official Docker base images based on various Linux distributions. They also have base images that come with language-specific modules such as [Python](https://hub.docker.com/_/python)
. The `python` images come in many flavors, each designed for a specific use case. Here, we use the `python:3.9-slim` image which is a lightweight image that comes with the latest version of Python 3.9.
_star_
#### Tip
You can also use your own base image, provided the image you use contains a [supported version of Python](/knowledge-base/using-streamlit/sanity-checks#check-0-are-you-using-a-streamlit-supported-version-of-python)
for Streamlit. There is no one-size-fits-all approach to using any specific base image, nor is there an official Streamlit-specific base image.
2. The `WORKDIR` instruction sets the working directory for any `RUN`, `CMD`, `ENTRYPOINT`, `COPY` and `ADD` instructions that follow it in the `Dockerfile` . Let’s set it to `app/` :
`WORKDIR /app`
_priority\_high_
#### Important
As mentioned in [Development flow](/get-started/fundamentals/main-concepts#development-flow)
, for Streamlit version 1.10.0 and higher, Streamlit apps cannot be run from the root directory of Linux distributions. Your main script should live in a directory other than the root directory. If you try to run a Streamlit app from the root directory, Streamlit will throw a `FileNotFoundError: [Errno 2] No such file or directory` error. For more information, see GitHub issue [#5239](https://github.com/streamlit/streamlit/issues/5239)
.
If you are using Streamlit version 1.10.0 or higher, you must set the `WORKDIR` to a directory other than the root directory. For example, you can set the `WORKDIR` to `/app` as shown in the example `Dockerfile` above.
3. Install `git` so that we can clone the app code from a remote repo:
`RUN apt-get update && apt-get install -y \ build-essential \ curl \ software-properties-common \ git \ && rm -rf /var/lib/apt/lists/*`
4. Clone your code that lives in a remote repo to `WORKDIR`:
a. If your code is in a public repo:
`RUN git clone https://github.com/streamlit/streamlit-example.git .`
Once cloned, the directory of `WORKDIR` will look like the following:
`app/ - requirements.txt - streamlit_app.py`
where `requirements.txt` file contains all your [Python dependencies](/deploy/streamlit-community-cloud/deploy-your-app/app-dependencies#add-python-dependencies)
. E.g
`altair pandas streamlit`
and `streamlit_app.py` is your main script. E.g.
``from collections import namedtuple import altair as alt import math import pandas as pd import streamlit as st """ # Welcome to Streamlit! Edit `/streamlit_app.py` to customize this app to your heart's desire :heart: If you have any questions, checkout our [documentation](https://docs.streamlit.io) and [community forums](https://discuss.streamlit.io). In the meantime, below is an example of what you can do with just a few lines of code: """ with st.echo(code_location='below'): total_points = st.slider("Number of points in spiral", 1, 5000, 2000) num_turns = st.slider("Number of turns in spiral", 1, 100, 9) Point = namedtuple('Point', 'x y') data = [] points_per_turn = total_points / num_turns for curr_point_num in range(total_points): curr_turn, i = divmod(curr_point_num, points_per_turn) angle = (curr_turn + 1) * 2 * math.pi * i / points_per_turn radius = curr_point_num / total_points x = radius * math.cos(angle) y = radius * math.sin(angle) data.append(Point(x, y)) st.altair_chart(alt.Chart(pd.DataFrame(data), height=500, width=500) .mark_circle(color='#0068c9', opacity=0.5) .encode(x='x:Q', y='y:Q'))``
b. If your code is in a private repo, please read [Using SSH to access private data in builds](https://docs.docker.com/develop/develop-images/build_enhancements/#using-ssh-to-access-private-data-in-builds)
and modify the Dockerfile accordingly -- to install an SSH client, download the public key for [github.com](https://github.com)
, and clone your private repo. If you use an alternative VCS such as GitLab or Bitbucket, please consult the documentation for that VCS on how to copy your code to the `WORKDIR` of the Dockerfile.
c. If your code lives in the same directory as the Dockerfile, copy all your app files from your server into the container, including `streamlit_app.py`, `requirements.txt`, etc, by replacing the `git clone` line with:
`COPY . .`
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](/deploy/streamlit-community-cloud/deploy-your-app/app-dependencies#add-python-dependencies)
from the cloned `requirements.txt` in the container:
`RUN pip3 install -r requirements.txt`
6. The [`EXPOSE`](https://docs.docker.com/engine/reference/builder/#expose)
instruction informs Docker that the container listens on the specified network ports at runtime. Your container needs to listen to Streamlit’s (default) port 8501:
`EXPOSE 8501`
7. The [`HEALTHCHECK`](https://docs.docker.com/engine/reference/builder/#expose)
instruction tells Docker how to test a container to check that it is still working. Your container needs to listen to Streamlit’s (default) port 8501:
`HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health`
8. An [`ENTRYPOINT`](https://docs.docker.com/engine/reference/builder/#entrypoint)
allows you to configure a container that will run as an executable. Here, it also contains the entire `streamlit run` command for your app, so you don’t have to call it from the command line:
`ENTRYPOINT ["streamlit", "run", "streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"]`
[](#build-a-docker-image)
Build a Docker image
------------------------------------------------
The [`docker build`](https://docs.docker.com/engine/reference/commandline/build/)
command builds an image from a `Dockerfile` . Run the following command from the `app/` directory on your server to build the image:
`docker build -t streamlit .`
The `-t` flag is used to tag the image. Here, we have tagged the image `streamlit`. If you run:
`docker images`
You should see a `streamlit` image under the REPOSITORY column. For example:
`REPOSITORY TAG IMAGE ID CREATED SIZE streamlit latest 70b0759a094d About a minute ago 1.02GB`
[](#run-the-docker-container)
Run the Docker container
--------------------------------------------------------
Now that you have built the image, you can run the container by executing:
`docker run -p 8501:8501 streamlit`
The `-p` flag publishes the container’s port 8501 to your server’s 8501 port.
If all went well, you should see an output similar to the following:
`docker run -p 8501:8501 streamlit You can now view your Streamlit app in your browser. URL: http://0.0.0.0:8501`
To view your app, users can browse to `http://0.0.0.0:8501` or `http://localhost:8501`
_push\_pin_
#### Note
Based on your server's network configuration, you could map to port 80/443 so that users can view your app using the server IP or hostname. For example: `http://your-server-ip:80` or `http://your-hostname:443`.
[Previous: Other platforms](/deploy/tutorials)
[Next: Kubernetes](/deploy/tutorials/kubernetes)
_forum_
### Still have questions?
Our [forums](https://discuss.streamlit.io)
are full of helpful information and Streamlit experts.
---
# Streamlit in Snowflake - Streamlit Docs
[](#deploy-streamlit-apps-in-snowflake)
Deploy Streamlit apps in Snowflake
============================================================================
Host your apps alongside your data in a single, global platform. Snowflake provides industry-leading features that ensure the highest levels of security for your account, users, data, and apps. If you're looking for an enterprise hosting solution, try Snowflake!
[_rocket\_launch_\
\
#### Streamlit in Snowflake Quickstart\
\
Create a free trial account and deploy an app with Streamlit in Snowflake.](/get-started/installation/streamlit-in-snowflake?slug=deploy&slug=snowflake)
[_code_\
\
#### Examples\
\
Explore a wide variety of example apps in Snowflake Labs' snowflake-demo-streamlit repository.](https://github.com/Snowflake-Labs/snowflake-demo-streamlit?slug=deploy&slug=snowflake)
[_book_\
\
#### Get started with Snowflake\
\
Learn more in Snowflake's documentation.](https://docs.snowflake.com/user-guide-getting-started?slug=deploy&slug=snowflake)
There are three ways to host Streamlit apps in Snowflake:
[_bolt_](https://docs.snowflake.com/developer-guide/streamlit/about-streamlit)
[Streamlit in Snowflake.](https://docs.snowflake.com/developer-guide/streamlit/about-streamlit)
Run your Streamlit app as a native object in Snowflake. Enjoy an in-browser editor and minimal work to configure your environment. Share your app with other users in your Snowflake account through role-based access control (RBAC). This is a great way to deploy apps internally for your business. Check out Snowflake docs!
[_ac\_unit_](https://docs.snowflake.com/en/developer-guide/native-apps/adding-streamlit)
[Snowflake Native Apps.](https://docs.snowflake.com/en/developer-guide/native-apps/adding-streamlit)
Package your app with data and share it with other Snowflake accounts. This is a great way to share apps and their underlying data with other organizations who use Snowflake. Check out Snowflake docs!
[_web\_asset_](https://docs.snowflake.com/en/developer-guide/snowpark-container-services/overview)
[Snowpark Container Services.](https://docs.snowflake.com/en/developer-guide/snowpark-container-services/overview)
Deploy your app in a container that's optimized to run in Snowflake. This is the most flexible option, where you can use any library and assign a public URL to your app. Manage your allowed viewers through your Snowflake account. Check out Snowflake docs!
_push\_pin_
#### Note
Using Snowpark Container Services to deploy a Streamlit app requires a compute pool, which is not available in a trial account at this time.
[Previous: Streamlit Community Cloud](/deploy/streamlit-community-cloud)
[Next: Other platforms](/deploy/tutorials)
_forum_
### Still have questions?
Our [forums](https://discuss.streamlit.io)
are full of helpful information and Streamlit experts.
---
# Deploy Streamlit using Kubernetes - Streamlit Docs
[](#deploy-streamlit-using-kubernetes)
Deploy Streamlit using Kubernetes
==========================================================================
[](#introduction)
Introduction
--------------------------------
So you have an amazing app and you want to start sharing it with other people, what do you do? You have a few options. First, where do you want to run your Streamlit app, and how do you want to access it?
* **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](/deploy/tutorials/docker)
.
[](#prerequisites)
Prerequisites
----------------------------------
1. [Install Docker Engine](#install-docker-engine)
2. [Install the gcloud CLI](#install-the-gcloud-cli)
### [](#install-docker-engine)
Install Docker Engine
If you haven't already done so, install [Docker](https://docs.docker.com/engine/install/#server)
on your server. Docker provides `.deb` and `.rpm` packages from many Linux distributions, including:
* [Debian](https://docs.docker.com/engine/install/debian/)
* [Ubuntu](https://docs.docker.com/engine/install/ubuntu/)
Verify that Docker Engine is installed correctly by running the `hello-world` Docker image:
`sudo docker run hello-world`
_star_
#### Tip
Follow Docker's official [post-installation steps for Linux](https://docs.docker.com/engine/install/linux-postinstall/)
to run Docker as a non-root user, so that you don't have to preface the `docker` command with `sudo`.
### [](#install-the-gcloud-cli)
Install the gcloud CLI
In this guide, we will orchestrate Docker containers with Kubernetes and host docker images on the Google Container Registry (GCR). As GCR is a Google-supported Docker registry, we need to register [`gcloud`](https://cloud.google.com/sdk/gcloud/reference)
as the Docker credential helper.
Follow the official documentation to [Install the gcloud CLI](https://cloud.google.com/sdk/docs/install)
and initialize it.
[](#create-a-docker-container)
Create a Docker container
----------------------------------------------------------
We need to create a docker container which contains all the dependencies and the application code. Below you can see the entrypoint, i.e. the command run when the container starts, and the Dockerfile definition.
### [](#create-an-entrypoint-script)
Create an entrypoint script
Create a `run.sh` script containing the following:
`#!/bin/bash APP_PID= stopRunningProcess() { # Based on https://linuxconfig.org/how-to-propagate-a-signal-to-child-processes-from-a-bash-script if test ! "${APP_PID}" = '' && ps -p ${APP_PID} > /dev/null ; then > /proc/1/fd/1 echo "Stopping ${COMMAND_PATH} which is running with process ID ${APP_PID}" kill -TERM ${APP_PID} > /proc/1/fd/1 echo "Waiting for ${COMMAND_PATH} to process SIGTERM signal" wait ${APP_PID} > /proc/1/fd/1 echo "All processes have stopped running" else > /proc/1/fd/1 echo "${COMMAND_PATH} was not started when the signal was sent or it has already been stopped" fi } trap stopRunningProcess EXIT TERM source ${VIRTUAL_ENV}/bin/activate streamlit run ${HOME}/app/streamlit_app.py & APP_ID=${!} wait ${APP_ID}`
### [](#create-a-dockerfile)
Create a Dockerfile
Docker builds images by reading the instructions from a `Dockerfile`. A `Dockerfile` is a text document that contains all the commands a user could call on the command line to assemble an image. Learn more in the [Dockerfile reference](https://docs.docker.com/engine/reference/builder/)
. The [docker build](https://docs.docker.com/engine/reference/commandline/build/)
command builds an image from a `Dockerfile`. The [docker run](https://docs.docker.com/engine/reference/commandline/run/)
command first creates a container over the specified image, and then starts it using the specified command.
Here's an example `Dockerfile` that you can add to the root of your directory.
`FROM python:3.9-slim RUN groupadd --gid 1000 appuser \ && useradd --uid 1000 --gid 1000 -ms /bin/bash appuser RUN pip3 install --no-cache-dir --upgrade \ pip \ virtualenv RUN apt-get update && apt-get install -y \ build-essential \ software-properties-common \ git USER appuser WORKDIR /home/appuser RUN git clone https://github.com/streamlit/streamlit-example.git app ENV VIRTUAL_ENV=/home/appuser/venv RUN virtualenv ${VIRTUAL_ENV} RUN . ${VIRTUAL_ENV}/bin/activate && pip install -r app/requirements.txt EXPOSE 8501 COPY run.sh /home/appuser ENTRYPOINT ["./run.sh"]`
_priority\_high_
#### Important
As mentioned in [Development flow](/get-started/fundamentals/main-concepts#development-flow)
, for Streamlit version 1.10.0 and higher, Streamlit apps cannot be run from the root directory of Linux distributions. Your main script should live in a directory other than the root directory. If you try to run a Streamlit app from the root directory, Streamlit will throw a `FileNotFoundError: [Errno 2] No such file or directory` error. For more information, see GitHub issue [#5239](https://github.com/streamlit/streamlit/issues/5239)
.
If you are using Streamlit version 1.10.0 or higher, you must set the `WORKDIR` to a directory other than the root directory. For example, you can set the `WORKDIR` to `/home/appuser` as shown in the example `Dockerfile` above.
### [](#build-a-docker-image)
Build a Docker image
Put the above files (`run.sh` and `Dockerfile`) in the same folder and build the docker image:
`docker build --platform linux/amd64 -t gcr.io/$GCP_PROJECT_ID/k8s-streamlit:test .`
_priority\_high_
#### Important
Replace `$GCP_PROJECT_ID` in the above command with the name of your Google Cloud project.
### [](#upload-the-docker-image-to-a-container-registry)
Upload the Docker image to a container registry
The next step is to upload the Docker image to a container registry. In this example, we will use the [Google Container Registry (GCR)](https://cloud.google.com/container-registry)
. Start by enabling the Container Registry API. Sign in to Google Cloud and navigate to your project’s **Container Registry** and click **Enable**.
We can now build the Docker image from the previous step and push it to our project’s GCR. Be sure to replace `$GCP_PROJECT_ID` in the docker push command with the name of your project:
`gcloud auth configure-docker docker push gcr.io/$GCP_PROJECT_ID/k8s-streamlit:test`
[](#create-a-kubernetes-deployment)
Create a Kubernetes deployment
--------------------------------------------------------------------
For this step you will need a:
* Running Kubernetes service
* Custom domain for which you can generate a TLS certificate
* DNS service where you can configure your custom domain to point to the application IP
As the image was uploaded to the container registry in the previous step, we can run it in Kubernetes using the below configurations.
### [](#install-and-run-kubernetes)
Install and run Kubernetes
Make sure your [Kubernetes client](https://kubernetes.io/docs/tasks/tools/#kubectl)
, `kubectl`, is installed and running on your machine.
### [](#configure-a-google-oauth-client-and-oauth2-proxy)
Configure a Google OAuth Client and oauth2-proxy
For configuring the Google OAuth Client, please see [Google Auth Provider](https://oauth2-proxy.github.io/oauth2-proxy/docs/configuration/oauth_provider#google-auth-provider)
. Configure oauth2-proxy to use the desired [OAuth Provider Configuration](https://oauth2-proxy.github.io/oauth2-proxy/docs/configuration/oauth_provider)
and update the oath2-proxy config in the config map.
The below configuration contains a ouath2-proxy sidecar container which handles the authentication with Google. You can learn more from the [oauth2-proxy repository](https://github.com/oauth2-proxy/oauth2-proxy)
.
### [](#create-a-kubernetes-configuration-file)
Create a Kubernetes configuration file
Create a [YAML](https://yaml.org/)
[configuration file](https://kubernetes.io/docs/concepts/cluster-administration/manage-deployment/#organizing-resource-configurations)
named `k8s-streamlit.yaml`:
`apiVersion: v1 kind: ConfigMap metadata: name: streamlit-configmap data: oauth2-proxy.cfg: |- http_address = "0.0.0.0:4180" upstreams = ["http://127.0.0.1:8501/"] email_domains = ["*"] client_id = "" client_secret = "" cookie_secret = "<16, 24, or 32 bytes>" redirect_url = --- apiVersion: apps/v1 kind: Deployment metadata: name: streamlit-deployment labels: app: streamlit spec: replicas: 1 selector: matchLabels: app: streamlit template: metadata: labels: app: streamlit spec: containers: - name: oauth2-proxy image: quay.io/oauth2-proxy/oauth2-proxy:v7.2.0 args: ["--config", "/etc/oauth2-proxy/oauth2-proxy.cfg"] ports: - containerPort: 4180 livenessProbe: httpGet: path: /ping port: 4180 scheme: HTTP readinessProbe: httpGet: path: /ping port: 4180 scheme: HTTP volumeMounts: - mountPath: "/etc/oauth2-proxy" name: oauth2-config - name: streamlit image: gcr.io/GCP_PROJECT_ID/k8s-streamlit:test imagePullPolicy: Always ports: - containerPort: 8501 livenessProbe: httpGet: path: /_stcore/health port: 8501 scheme: HTTP timeoutSeconds: 1 readinessProbe: httpGet: path: /_stcore/health port: 8501 scheme: HTTP timeoutSeconds: 1 resources: limits: cpu: 1 memory: 2Gi requests: cpu: 100m memory: 745Mi volumes: - name: oauth2-config configMap: name: streamlit-configmap --- apiVersion: v1 kind: Service metadata: name: streamlit-service spec: type: LoadBalancer selector: app: streamlit ports: - name: streamlit-port protocol: TCP port: 80 targetPort: 4180`
_priority\_high_
#### Important
While the above configurations can be copied verbatim, you will have to configure the `oauth2-proxy` yourself and use the correct `GOOGLE_CLIENT_ID`, `GOOGLE_CLIENT_ID`, `GCP_PROJECT_ID`, and `REDIRECT_URL`.
Now create the configuration from the file in Kubernetes with the [`kubectl create`](https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#create)
command:
`kubctl create -f k8s-streamlit.yaml`
### [](#set-up-tls-support)
Set up TLS support
Since you are using the Google authentication, you will need to set up TLS support. Find out how in [TLS Configuration](https://oauth2-proxy.github.io/oauth2-proxy/docs/configuration/tls)
.
### [](#verify-the-deployment)
Verify the deployment
Once the deployment and the service are created, we need to wait a couple of minutes for the public IP address to become available. We can check when that is ready by running:
`kubectl get service streamlit-service -o jsonpath='{.status.loadBalancer.ingress[0].ip}'`
After the public IP is assigned, you will need to configure in your DNS service an `A record` pointing to the above IP address.
[Previous: Docker](/deploy/tutorials/docker)
[Next: Knowledge base](/knowledge-base)
_forum_
### Still have questions?
Our [forums](https://discuss.streamlit.io)
are full of helpful information and Streamlit experts.
---
# st.cache_data - Streamlit Docs
_star_
#### Tip
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)
.
[](#stcache_data)
st.cache\_data
----------------------------------
Streamlit VersionVersion 1.43.0Version 1.42.0Version 1.41.0Version 1.40.0Version 1.39.0Version 1.38.0Version 1.37.0Version 1.36.0Version 1.35.0Version 1.34.0Version 1.33.0Version 1.32.0Version 1.31.0Version 1.30.0Version 1.29.0Version 1.28.0Version 1.27.0Version 1.26.0Version 1.25.0Version 1.24.0Version 1.23.0Version 1.22.0Version 1.21.0Version 1.20.0Streamlit in Snowflake
Decorator to cache functions that return data (e.g. dataframe transforms, database queries, ML inference).
Cached objects are stored in "pickled" form, which means that the return value of a cached function must be pickleable. Each caller of the cached function gets its own copy of the cached data.
You can clear a function's cache with func.clear() or clear the entire cache with st.cache\_data.clear().
A function's arguments must be hashable to cache it. If you have an unhashable argument (like a database connection) or an argument you want to exclude from caching, use an underscore prefix in the argument name. In this case, Streamlit will return a cached value when all other arguments match a previous function call. Alternatively, you can declare custom hashing functions with hash\_funcs.
To cache global resources, use st.cache\_resource instead. Learn more about caching at [https://docs.streamlit.io/develop/concepts/architecture/caching](https://docs.streamlit.io/develop/concepts/architecture/caching)
.
| Function signature[\[source\]](https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/runtime/caching/cache_data_api.py#L379 "View st.cache_data source code on GitHub") | |
| --- | --- |
| st.cache\_data(func=None, \*, ttl, max\_entries, show\_spinner, persist, experimental\_allow\_widgets, hash\_funcs=None) | |
| --- | --- |
| Parameters | |
| func (callable) | The function to cache. Streamlit hashes the function's source code. |
| ttl (float, timedelta, str, or None) | The maximum time to keep an entry in the cache. Can be one of:
* None if cache entries should never expire (default).
* A number specifying the time in seconds.
* A string specifying the time in a format supported by [Pandas's Timedelta constructor](https://pandas.pydata.org/docs/reference/api/pandas.Timedelta.html)
, e.g. "1d", "1.5 days", or "1h23s".
* A timedelta object from [Python's built-in datetime library](https://docs.python.org/3/library/datetime.html#timedelta-objects)
, e.g. timedelta(days=1).
Note that ttl will be ignored if persist="disk" or persist=True. |
| max\_entries (int or None) | The maximum number of entries to keep in the cache, or None for an unbounded cache. When a new entry is added to a full cache, the oldest cached entry will be removed. Defaults to None. |
| show\_spinner (bool or str) | Enable the spinner. Default is True to show a spinner when there is a "cache miss" and the cached data is being created. If string, value of show\_spinner param will be used for spinner text. |
| persist ("disk", bool, or None) | Optional location to persist cached data to. Passing "disk" (or True) will persist the cached data to the local disk. None (or False) will disable persistence. The default is None. |
| experimental\_allow\_widgets (bool) | _delete_
The cached widget replay functionality was removed in 1.38. Please remove the experimental\_allow\_widgets parameter from your caching decorators. This parameter will be removed in a future version.
Allow widgets to be used in the cached function. Defaults to False. |
| hash\_funcs (dict or None) | Mapping of types or fully qualified names to hash functions. This is used to override the behavior of the hasher inside Streamlit's caching mechanism: when the hasher encounters an object, it will first check to see if its type matches a key in this dict and, if so, will use the provided function to generate a hash for it. See below for an example of how this can be used. |
#### Example
import streamlit as st
@st.cache\_data
def fetch\_and\_clean\_data(url):
# Fetch data from URL here, and then clean it up.
return data
d1 = fetch\_and\_clean\_data(DATA\_URL\_1)
# Actually executes the function, since this is the first time it was
# encountered.
d2 = fetch\_and\_clean\_data(DATA\_URL\_1)
# Does not execute the function. Instead, returns its previously computed
# value. This means that now the data in d1 is the same as in d2.
d3 = fetch\_and\_clean\_data(DATA\_URL\_2)
# This is a different URL, so the function executes.
To set the persist parameter, use this command as follows:
import streamlit as st
@st.cache\_data(persist="disk")
def fetch\_and\_clean\_data(url):
# Fetch data from URL here, and then clean it up.
return data
By default, all parameters to a cached function must be hashable. Any parameter whose name begins with \_ will not be hashed. You can use this as an "escape hatch" for parameters that are not hashable:
import streamlit as st
@st.cache\_data
def fetch\_and\_clean\_data(\_db\_connection, num\_rows):
# Fetch data from \_db\_connection here, and then clean it up.
return data
connection = make\_database\_connection()
d1 = fetch\_and\_clean\_data(connection, num\_rows=10)
# Actually executes the function, since this is the first time it was
# encountered.
another\_connection = make\_database\_connection()
d2 = fetch\_and\_clean\_data(another\_connection, num\_rows=10)
# Does not execute the function. Instead, returns its previously computed
# value - even though the \_database\_connection parameter was different
# in both calls.
A cached function's cache can be procedurally cleared:
import streamlit as st
@st.cache\_data
def fetch\_and\_clean\_data(\_db\_connection, num\_rows):
# Fetch data from \_db\_connection here, and then clean it up.
return data
fetch\_and\_clean\_data.clear(\_db\_connection, 50)
# Clear the cached entry for the arguments provided.
fetch\_and\_clean\_data.clear()
# Clear all cached entries for this function.
To override the default hashing behavior, pass a custom hash function. You can do that by mapping a type (e.g. datetime.datetime) to a hash function (lambda dt: dt.isoformat()) like this:
import streamlit as st
import datetime
@st.cache\_data(hash\_funcs={datetime.datetime: lambda dt: dt.isoformat()})
def convert\_to\_utc(dt: datetime.datetime):
return dt.astimezone(datetime.timezone.utc)
Alternatively, you can map the type's fully-qualified name (e.g. "datetime.datetime") to the hash function instead:
import streamlit as st
import datetime
@st.cache\_data(hash\_funcs={"datetime.datetime": lambda dt: dt.isoformat()})
def convert\_to\_utc(dt: datetime.datetime):
return dt.astimezone(datetime.timezone.utc)
_priority\_high_
#### Warning
`st.cache_data` implicitly uses the `pickle` module, which is known to be insecure. Anything your cached function returns is pickled and stored, then unpickled on retrieval. Ensure your cached functions return trusted values because it is possible to construct malicious pickle data that will execute arbitrary code during unpickling. Never load data that could have come from an untrusted source in an unsafe mode or that could have been tampered with. **Only load data you trust**.
[](#stcache_dataclear)
st.cache\_data.clear
---------------------------------------------
Streamlit VersionVersion 1.43.0Version 1.42.0Version 1.41.0Version 1.40.0Version 1.39.0Version 1.38.0Version 1.37.0Version 1.36.0Version 1.35.0Version 1.34.0Version 1.33.0Version 1.32.0Version 1.31.0Version 1.30.0Version 1.29.0Version 1.28.0Version 1.27.0Version 1.26.0Version 1.25.0Version 1.24.0Version 1.23.0Version 1.22.0Version 1.21.0Version 1.20.0Streamlit in Snowflake
Clear all in-memory and on-disk data caches.
| Function signature[\[source\]](https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/runtime/caching/cache_data_api.py#L593 "View st.cache_data.clear source code on GitHub") | |
| --- |
| st.cache\_data.clear() | |
| --- |
#### [](#example)
Example
In the example below, pressing the "Clear All" button will clear memoized values from all functions decorated with `@st.cache_data`.
`import streamlit as st @st.cache_data def square(x): return x**2 @st.cache_data def cube(x): return x**3 if st.button("Clear All"): # Clear values from *all* all in-memory and on-disk data caches: # i.e. clear values from both square and cube st.cache_data.clear()`
[](#cachedfuncclear)
CachedFunc.clear
---------------------------------------
Streamlit VersionVersion 1.43.0Version 1.42.0Version 1.41.0Version 1.40.0Version 1.39.0Version 1.38.0Version 1.37.0Version 1.36.0Version 1.35.0Version 1.34.0Version 1.33.0Version 1.32.0Version 1.31.0Version 1.30.0Version 1.29.0Version 1.28.0Version 1.27.0Version 1.26.0Version 1.25.0Version 1.24.0Version 1.23.0Version 1.22.0Version 1.21.0Version 1.20.0Streamlit in Snowflake
Clear the cached function's associated cache.
If no arguments are passed, Streamlit will clear all values cached for the function. If arguments are passed, Streamlit will clear the cached value for these arguments only.
| Function signature[\[source\]](https://github.com/streamlit/streamlit/blob/1.43.0/lib/streamlit/runtime/caching/cache_utils.py#L346 "View st.clear source code on GitHub") | |
| --- | --- |
| CachedFunc.clear(\*args, \*\*kwargs) | |
| --- | --- |
| Parameters | |
| \*args (Any) | Arguments of the cached functions. |
| \*\*kwargs (Any) | Keyword arguments of the cached function. |
#### Example
import streamlit as st
import time
@st.cache\_data
def foo(bar):
time.sleep(2)
st.write(f"Executed foo({bar}).")
return bar
if st.button("Clear all cached values for \`foo\`", on\_click=foo.clear):
foo.clear()
if st.button("Clear the cached value of \`foo(1)\`"):
foo.clear(1)
foo(1)
foo(2)
[](#using-streamlit-commands-in-cached-functions)
Using Streamlit commands in cached functions
------------------------------------------------------------------------------------------------
### [](#static-elements)
Static elements
Since version 1.16.0, cached functions can contain Streamlit commands! For example, you can do this:
`@st.cache_data def get_api_data(): data = api.get(...) st.success("Fetched data from API!") # 👈 Show a success message return data`
As we know, Streamlit only runs this function if it hasn’t been cached before. On this first run, the `st.success` message will appear in the app. But what happens on subsequent runs? It still shows up! Streamlit realizes that there is an `st.` command inside the cached function, saves it during the first run, and replays it on subsequent runs. Replaying static elements works for both caching decorators.
You can also use this functionality to cache entire parts of your UI:
`@st.cache_data def show_data(): st.header("Data analysis") data = api.get(...) st.success("Fetched data from API!") st.write("Here is a plot of the data:") st.line_chart(data) st.write("And here is the raw data:") st.dataframe(data)`
### [](#input-widgets)
Input widgets
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:
`@st.cache_data(experimental_allow_widgets=True) # 👈 Set the parameter def get_data(): num_rows = st.slider("Number of rows to get") # 👈 Add a slider data = api.get(..., num_rows) return data`
Streamlit treats the slider like an additional input parameter to the cached function. If you change the slider position, Streamlit will see if it has already cached the function for this slider value. If yes, it will return the cached value. If not, it will rerun the function using the new slider value.
Using widgets in cached functions is extremely powerful because it lets you cache entire parts of your app. But it can be dangerous! Since Streamlit treats the widget value as an additional input parameter, it can easily lead to excessive memory usage. Imagine your cached function has five sliders and returns a 100 MB DataFrame. Then we’ll add 100 MB to the cache for _every permutation_ of these five slider values – even if the sliders do not influence the returned data! These additions can make your cache explode very quickly. Please be aware of this limitation if you use widgets in cached functions. We recommend using this feature only for isolated parts of your UI where the widgets directly influence the cached return value.
_priority\_high_
#### Warning
Support for widgets in cached functions is currently experimental. We may change or remove it anytime without warning. Please use it with care!
_push\_pin_
#### Note
Two widgets are currently not supported in cached functions: `st.file_uploader` and `st.camera_input`. We may support them in the future. Feel free to [open a GitHub issue](https://github.com/streamlit/streamlit/issues)
if you need them!
[Previous: Caching & state](/develop/api-reference/caching-and-state)
[Next: st.cache\_resource](/develop/api-reference/caching-and-state/st.cache_resource)
_forum_
### Still have questions?
Our [forums](https://discuss.streamlit.io)
are full of helpful information and Streamlit experts.
---
# API Reference - Streamlit Docs
[](#api-reference)
API reference
==================================
Streamlit makes it easy for you to visualize, mutate, and share data. The API reference is organized by activity type, like displaying data or optimizing performance. Each section includes methods associated with the activity type, including examples.
Browse our API below and click to learn more about any of our available commands! 🎈
[](#display-almost-anything)
Display almost anything
------------------------------------------------------
### [](#write-and-magic)
Write and magic
[#### st.write\
\
Write arguments to the app.\
\
`st.write("Hello **world**!") st.write(my_data_frame) st.write(my_mpl_figure)`](/develop/api-reference/write-magic/st.write)
[#### st.write\_stream\
\
Write generators or streams to the app with a typewriter effect.\
\
`st.write_stream(my_generator) st.write_stream(my_llm_stream)`](/develop/api-reference/write-magic/st.write_stream)
[#### Magic\
\
Any time Streamlit sees either a variable or literal value on its own line, it automatically writes that to your app using `st.write`\
\
`"Hello **world**!" my_data_frame my_mpl_figure`](/develop/api-reference/write-magic/magic)
### [](#text-elements)
Text elements
[\
\
#### Markdown\
\
Display string formatted as Markdown.\
\
`st.markdown("Hello **world**!")`](/develop/api-reference/text/st.markdown)
[\
\
#### Title\
\
Display text in title formatting.\
\
`st.title("The app title")`](/develop/api-reference/text/st.title)
[\
\
#### Header\
\
Display text in header formatting.\
\
`st.header("This is a header")`](/develop/api-reference/text/st.header)
[\
\
#### Subheader\
\
Display text in subheader formatting.\
\
`st.subheader("This is a subheader")`](/develop/api-reference/text/st.subheader)
[\
\
#### Caption\
\
Display text in small font.\
\
`st.caption("This is written small caption text")`](/develop/api-reference/text/st.caption)
[\
\
#### Code block\
\
Display a code block with optional syntax highlighting.\
\
`st.code("a = 1234")`](/develop/api-reference/text/st.code)
[\
\
#### Echo\
\
Display some code in the app, then execute it. Useful for tutorials.\
\
`with st.echo(): st.write('This code will be printed')`](/develop/api-reference/text/st.echo)
[\
\
#### LaTeX\
\
Display mathematical expressions formatted as LaTeX.\
\
`st.latex("\int a x^2 \,dx")`](/develop/api-reference/text/st.latex)
[\
\
#### Preformatted text\
\
Write fixed-width and preformatted text.\
\
`st.text("Hello world")`](/develop/api-reference/text/st.text)
[\
\
#### Divider\
\
Display a horizontal rule.\
\
`st.divider()`](/develop/api-reference/text/st.divider)
[#### Get help\
\
Display object’s doc string, nicely formatted.\
\
`st.help(st.write) st.help(pd.DataFrame)`](/develop/api-reference/text/st.help)
[#### Render HTML\
\
Renders HTML strings to your app.\
\
`st.html("Foo bar.
")`](/develop/api-reference/text/st.html)
Third-party components
These are featured components created by our lovely community. For more examples and inspiration, check out our [Components Gallery](https://streamlit.io/components)
and [Streamlit Extras](https://extras.streamlit.app)
!
Previous
[\
\
#### Tags](https://github.com/gagan3012/streamlit-tags)
[Add tags to your Streamlit apps. Created by](https://github.com/gagan3012/streamlit-tags)
[@gagan3012](https://github.com/gagan3012)
.
`st_tags(label='# Enter Keywords:', text='Press enter to add more', value=['Zero', 'One', 'Two'], suggestions=['five', 'six', 'seven', 'eight', 'nine', 'three', 'eleven', 'ten', 'four'], maxtags = 4, key='1')`
[\
\
#### NLU](https://github.com/JohnSnowLabs/nlu)
[Apply text mining on a dataframe. Created by](https://github.com/JohnSnowLabs/nlu)
[@JohnSnowLabs](https://github.com/JohnSnowLabs/)
.
`nlu.load('sentiment').predict('I love NLU! <3')`
[\
\
#### Streamlit Extras](https://extras.streamlit.app/)
[A library with useful Streamlit extras. Created by](https://extras.streamlit.app/)
[@arnaudmiribel](https://github.com/arnaudmiribel/)
.
`mention(label="An awesome Streamlit App", icon="streamlit", url="https://extras.streamlit.app",)`
[\
\
#### Annotated text](https://github.com/tvst/st-annotated-text)
[Display annotated text in Streamlit apps. Created by](https://github.com/tvst/st-annotated-text)
[@tvst](https://github.com/tvst)
.
`annotated_text("This ", ("is", "verb"), " some ", ("annotated", "adj"), ("text", "noun"), " for those of ", ("you", "pronoun"), " who ", ("like", "verb"), " this sort of ", ("thing", "noun"), ".")`
[\
\
#### Drawable Canvas](https://github.com/andfanilo/streamlit-drawable-canvas)
[Provides a sketching canvas using](https://github.com/andfanilo/streamlit-drawable-canvas)
[Fabric.js](http://fabricjs.com/)
. Created by [@andfanilo](https://github.com/andfanilo)
.
`st_canvas(fill_color="rgba(255, 165, 0, 0.3)", stroke_width=stroke_width, stroke_color=stroke_color, background_color=bg_color, background_image=Image.open(bg_image) if bg_image else None, update_streamlit=realtime_update, height=150, drawing_mode=drawing_mode, point_display_radius=point_display_radius if drawing_mode == 'point' else 0, key="canvas",)`
[\
\
#### Tags](https://github.com/gagan3012/streamlit-tags)
[Add tags to your Streamlit apps. Created by](https://github.com/gagan3012/streamlit-tags)
[@gagan3012](https://github.com/gagan3012)
.
`st_tags(label='# Enter Keywords:', text='Press enter to add more', value=['Zero', 'One', 'Two'], suggestions=['five', 'six', 'seven', 'eight', 'nine', 'three', 'eleven', 'ten', 'four'], maxtags = 4, key='1')`
[\
\
#### NLU](https://github.com/JohnSnowLabs/nlu)
[Apply text mining on a dataframe. Created by](https://github.com/JohnSnowLabs/nlu)
[@JohnSnowLabs](https://github.com/JohnSnowLabs/)
.
`nlu.load('sentiment').predict('I love NLU! <3')`
[\
\
#### Streamlit Extras](https://extras.streamlit.app/)
[A library with useful Streamlit extras. Created by](https://extras.streamlit.app/)
[@arnaudmiribel](https://github.com/arnaudmiribel/)
.
`mention(label="An awesome Streamlit App", icon="streamlit", url="https://extras.streamlit.app",)`
[\
\
#### Annotated text](https://github.com/tvst/st-annotated-text)
[Display annotated text in Streamlit apps. Created by](https://github.com/tvst/st-annotated-text)
[@tvst](https://github.com/tvst)
.
`annotated_text("This ", ("is", "verb"), " some ", ("annotated", "adj"), ("text", "noun"), " for those of ", ("you", "pronoun"), " who ", ("like", "verb"), " this sort of ", ("thing", "noun"), ".")`
[\
\
#### Drawable Canvas](https://github.com/andfanilo/streamlit-drawable-canvas)
[Provides a sketching canvas using](https://github.com/andfanilo/streamlit-drawable-canvas)
[Fabric.js](http://fabricjs.com/)
. Created by [@andfanilo](https://github.com/andfanilo)
.
`st_canvas(fill_color="rgba(255, 165, 0, 0.3)", stroke_width=stroke_width, stroke_color=stroke_color, background_color=bg_color, background_image=Image.open(bg_image) if bg_image else None, update_streamlit=realtime_update, height=150, drawing_mode=drawing_mode, point_display_radius=point_display_radius if drawing_mode == 'point' else 0, key="canvas",)`
[\
\
#### Tags](https://github.com/gagan3012/streamlit-tags)
[Add tags to your Streamlit apps. Created by](https://github.com/gagan3012/streamlit-tags)
[@gagan3012](https://github.com/gagan3012)
.
`st_tags(label='# Enter Keywords:', text='Press enter to add more', value=['Zero', 'One', 'Two'], suggestions=['five', 'six', 'seven', 'eight', 'nine', 'three', 'eleven', 'ten', 'four'], maxtags = 4, key='1')`
[\
\
#### NLU](https://github.com/JohnSnowLabs/nlu)
[Apply text mining on a dataframe. Created by](https://github.com/JohnSnowLabs/nlu)
[@JohnSnowLabs](https://github.com/JohnSnowLabs/)
.
`nlu.load('sentiment').predict('I love NLU! <3')`
[\
\
#### Streamlit Extras](https://extras.streamlit.app/)
[A library with useful Streamlit extras. Created by](https://extras.streamlit.app/)
[@arnaudmiribel](https://github.com/arnaudmiribel/)
.
`mention(label="An awesome Streamlit App", icon="streamlit", url="https://extras.streamlit.app",)`
Next
### [](#data-elements)
Data elements
[\
\
#### Dataframes\
\
Display a dataframe as an interactive table.\
\
`st.dataframe(my_data_frame)`](/develop/api-reference/data/st.dataframe)
[\
\
#### Data editor\
\
Display a data editor widget.\
\
`edited = st.data_editor(df, num_rows="dynamic")`](/develop/api-reference/data/st.data_editor)
[\
\
#### Column configuration\
\
Configure the display and editing behavior of dataframes and data editors.\
\
`st.column_config.NumberColumn("Price (in USD)", min_value=0, format="$%d")`](/develop/api-reference/data/st.column_config)
[\
\
#### Static tables\
\
Display a static table.\
\
`st.table(my_data_frame)`](/develop/api-reference/data/st.table)
[\
\
#### Metrics\
\
Display a metric in big bold font, with an optional indicator of how the metric changed.\
\
`st.metric("My metric", 42, 2)`](/develop/api-reference/data/st.metric)
[\
\
#### Dicts and JSON\
\
Display object or string as a pretty-printed JSON string.\
\
`st.json(my_dict)`](/develop/api-reference/data/st.json)
Third-party components
These are featured components created by our lovely community. For more examples and inspiration, check out our [Components Gallery](https://streamlit.io/components)
and [Streamlit Extras](https://extras.streamlit.app)
!
Previous
[\
\
#### Image Coordinates](https://github.com/blackary/streamlit-image-coordinates)
[Get the coordinates of clicks on an image. Created by](https://github.com/blackary/streamlit-image-coordinates)
[@blackary](https://github.com/blackary/)
.
`from streamlit_image_coordinates import streamlit_image_coordinates value = streamlit_image_coordinates("https://placekitten.com/200/300") st.write(value)`
[\
\
#### Plotly Events](https://github.com/null-jones/streamlit-plotly-events)
[Make Plotly charts interactive!. Created by](https://github.com/null-jones/streamlit-plotly-events)
[@null-jones](https://github.com/null-jones/)
.
`from streamlit_plotly_events import plotly_events fig = px.line(x=[1], y=[1]) selected_points = plotly_events(fig)`
[\
\
#### Streamlit Extras](https://extras.streamlit.app/)
[A library with useful Streamlit extras. Created by](https://extras.streamlit.app/)
[@arnaudmiribel](https://github.com/arnaudmiribel/)
.
`from streamlit_extras.metric_cards import style_metric_cards col3.metric(label="No Change", value=5000, delta=0) style_metric_cards()`
[\
\
#### Streamlit Aggrid](https://github.com/PablocFonseca/streamlit-aggrid)
[Implementation of Ag-Grid component for Streamlit. Created by](https://github.com/PablocFonseca/streamlit-aggrid)
[@PablocFonseca](https://github.com/PablocFonseca)
.
`df = pd.DataFrame({'col1': [1, 2, 3], 'col2': [4, 5, 6]}) grid_return = AgGrid(df, editable=True) new_df = grid_return['data']`
[\
\
#### Streamlit Folium](https://github.com/randyzwitch/streamlit-folium)
[Streamlit Component for rendering Folium maps. Created by](https://github.com/randyzwitch/streamlit-folium)
[@randyzwitch](https://github.com/randyzwitch)
.
`m = folium.Map(location=[39.949610, -75.150282], zoom_start=16) folium.Marker([39.949610, -75.150282], popup="Liberty Bell", tooltip="Liberty Bell").add_to(m) st_data = st_folium(m, width=725)`
[\
\
#### Pandas Profiling](https://github.com/okld/streamlit-pandas-profiling)
[Pandas profiling component for Streamlit. Created by](https://github.com/okld/streamlit-pandas-profiling)
[@okld](https://github.com/okld/)
.
`df = pd.read_csv("https://storage.googleapis.com/tf-datasets/titanic/train.csv") pr = df.profile_report() st_profile_report(pr)`
[\
\
#### Image Coordinates](https://github.com/blackary/streamlit-image-coordinates)
[Get the coordinates of clicks on an image. Created by](https://github.com/blackary/streamlit-image-coordinates)
[@blackary](https://github.com/blackary/)
.
`from streamlit_image_coordinates import streamlit_image_coordinates value = streamlit_image_coordinates("https://placekitten.com/200/300") st.write(value)`
[\
\
#### Plotly Events](https://github.com/null-jones/streamlit-plotly-events)
[Make Plotly charts interactive!. Created by](https://github.com/null-jones/streamlit-plotly-events)
[@null-jones](https://github.com/null-jones/)
.
`from streamlit_plotly_events import plotly_events fig = px.line(x=[1], y=[1]) selected_points = plotly_events(fig)`
[\
\
#### Streamlit Extras](https://extras.streamlit.app/)
[A library with useful Streamlit extras. Created by](https://extras.streamlit.app/)
[@arnaudmiribel](https://github.com/arnaudmiribel/)
.
`from streamlit_extras.metric_cards import style_metric_cards col3.metric(label="No Change", value=5000, delta=0) style_metric_cards()`
[\
\
#### Streamlit Aggrid](https://github.com/PablocFonseca/streamlit-aggrid)
[Implementation of Ag-Grid component for Streamlit. Created by](https://github.com/PablocFonseca/streamlit-aggrid)
[@PablocFonseca](https://github.com/PablocFonseca)
.
`df = pd.DataFrame({'col1': [1, 2, 3], 'col2': [4, 5, 6]}) grid_return = AgGrid(df, editable=True) new_df = grid_return['data']`
[\
\
#### Streamlit Folium](https://github.com/randyzwitch/streamlit-folium)
[Streamlit Component for rendering Folium maps. Created by](https://github.com/randyzwitch/streamlit-folium)
[@randyzwitch](https://github.com/randyzwitch)
.
`m = folium.Map(location=[39.949610, -75.150282], zoom_start=16) folium.Marker([39.949610, -75.150282], popup="Liberty Bell", tooltip="Liberty Bell").add_to(m) st_data = st_folium(m, width=725)`
[\
\
#### Pandas Profiling](https://github.com/okld/streamlit-pandas-profiling)
[Pandas profiling component for Streamlit. Created by](https://github.com/okld/streamlit-pandas-profiling)
[@okld](https://github.com/okld/)
.
`df = pd.read_csv("https://storage.googleapis.com/tf-datasets/titanic/train.csv") pr = df.profile_report() st_profile_report(pr)`
[\
\
#### Image Coordinates](https://github.com/blackary/streamlit-image-coordinates)
[Get the coordinates of clicks on an image. Created by](https://github.com/blackary/streamlit-image-coordinates)
[@blackary](https://github.com/blackary/)
.
`from streamlit_image_coordinates import streamlit_image_coordinates value = streamlit_image_coordinates("https://placekitten.com/200/300") st.write(value)`
[\
\
#### Plotly Events](https://github.com/null-jones/streamlit-plotly-events)
[Make Plotly charts interactive!. Created by](https://github.com/null-jones/streamlit-plotly-events)
[@null-jones](https://github.com/null-jones/)
.
`from streamlit_plotly_events import plotly_events fig = px.line(x=[1], y=[1]) selected_points = plotly_events(fig)`
[\
\
#### Streamlit Extras](https://extras.streamlit.app/)
[A library with useful Streamlit extras. Created by](https://extras.streamlit.app/)
[@arnaudmiribel](https://github.com/arnaudmiribel/)
.
`from streamlit_extras.metric_cards import style_metric_cards col3.metric(label="No Change", value=5000, delta=0) style_metric_cards()`
Next
### [](#chart-elements)
Chart elements
[\
\
#### Simple area charts\
\
Display an area chart.\
\
`st.area_chart(my_data_frame)`](/develop/api-reference/charts/st.area_chart)
[\
\
#### Simple bar charts\
\
Display a bar chart.\
\
`st.bar_chart(my_data_frame)`](/develop/api-reference/charts/st.bar_chart)
[\
\
#### Simple line charts\
\
Display a line chart.\
\
`st.line_chart(my_data_frame)`](/develop/api-reference/charts/st.line_chart)
[\
\
#### Simple scatter charts\
\
Display a line chart.\
\
`st.scatter_chart(my_data_frame)`](/develop/api-reference/charts/st.scatter_chart)
[\
\
#### Scatterplots on maps\
\
Display a map with points on it.\
\
`st.map(my_data_frame)`](/develop/api-reference/charts/st.map)
[\
\
#### Matplotlib\
\
Display a matplotlib.pyplot figure.\
\
`st.pyplot(my_mpl_figure)`](/develop/api-reference/charts/st.pyplot)
[\
\
#### Altair\
\
Display a chart using the Altair library.\
\
`st.altair_chart(my_altair_chart)`](/develop/api-reference/charts/st.altair_chart)
[\
\
#### Vega-Lite\
\
Display a chart using the Vega-Lite library.\
\
`st.vega_lite_chart(my_vega_lite_chart)`](/develop/api-reference/charts/st.vega_lite_chart)
[\
\
#### Plotly\
\
Display an interactive Plotly chart.\
\
`st.plotly_chart(my_plotly_chart)`](/develop/api-reference/charts/st.plotly_chart)
[\
\
#### Bokeh\
\
Display an interactive Bokeh chart.\
\
`st.bokeh_chart(my_bokeh_chart)`](/develop/api-reference/charts/st.bokeh_chart)
[\
\
#### PyDeck\
\
Display a chart using the PyDeck library.\
\
`st.pydeck_chart(my_pydeck_chart)`](/develop/api-reference/charts/st.pydeck_chart)
[\
\
#### GraphViz\
\
Display a graph using the dagre-d3 library.\
\
`st.graphviz_chart(my_graphviz_spec)`](/develop/api-reference/charts/st.graphviz_chart)
Third-party components
These are featured components created by our lovely community. For more examples and inspiration, check out our [Components Gallery](https://streamlit.io/components)
and [Streamlit Extras](https://extras.streamlit.app)
!
Previous
[\
\
#### Streamlit Lottie](https://github.com/andfanilo/streamlit-lottie)
[Integrate](https://github.com/andfanilo/streamlit-lottie)
[Lottie](https://lottiefiles.com/)
animations inside your Streamlit app. Created by [@andfanilo](https://github.com/andfanilo)
.
`lottie_hello = load_lottieurl("https://assets5.lottiefiles.com/packages/lf20_V9t630.json") st_lottie(lottie_hello, key="hello")`
[\
\
#### Plotly Events](https://github.com/null-jones/streamlit-plotly-events)
[Make Plotly charts interactive!. Created by](https://github.com/null-jones/streamlit-plotly-events)
[@null-jones](https://github.com/null-jones/)
.
`fig = px.line(x=[1], y=[1]) selected_points = plotly_events(fig)`
[\
\
#### Streamlit Extras](https://extras.streamlit.app/)
[A library with useful Streamlit extras. Created by](https://extras.streamlit.app/)
[@arnaudmiribel](https://github.com/arnaudmiribel/)
.
`chart += get_annotations_chart(annotations=[("Mar 01, 2008", "Pretty good day for GOOG"), ("Dec 01, 2007", "Something's going wrong for GOOG & AAPL"), ("Nov 01, 2008", "Market starts again thanks to..."), ("Dec 01, 2009", "Small crash for GOOG after..."),],) st.altair_chart(chart, use_container_width=True)`
[\
\
#### Plost](https://github.com/tvst/plost)
[A deceptively simple plotting library for Streamlit. Created by](https://github.com/tvst/plost)
[@tvst](https://github.com/tvst)
.
`import plost plost.line_chart(my_dataframe, x='time', y='stock_value', color='stock_name',)`
[\
\
#### HiPlot](https://github.com/facebookresearch/hiplot)
[High dimensional Interactive Plotting. Created by](https://github.com/facebookresearch/hiplot)
[@facebookresearch](https://github.com/facebookresearch)
.
`data = [{'dropout':0.1, 'lr': 0.001, 'loss': 10.0, 'optimizer': 'SGD'}, {'dropout':0.15, 'lr': 0.01, 'loss': 3.5, 'optimizer': 'Adam'}, {'dropout':0.3, 'lr': 0.1, 'loss': 4.5, 'optimizer': 'Adam'}] hip.Experiment.from_iterable(data).display()`
[\
\
#### ECharts](https://github.com/andfanilo/streamlit-echarts)
[High dimensional Interactive Plotting. Created by](https://github.com/andfanilo/streamlit-echarts)
[@andfanilo](https://github.com/andfanilo)
.
`from streamlit_echarts import st_echarts st_echarts(options=options)`
[\
\
#### Streamlit Folium](https://github.com/randyzwitch/streamlit-folium)
[Streamlit Component for rendering Folium maps. Created by](https://github.com/randyzwitch/streamlit-folium)
[@randyzwitch](https://github.com/randyzwitch)
.
`m = folium.Map(location=[39.949610, -75.150282], zoom_start=16) st_data = st_folium(m, width=725)`
[\
\
#### Spacy-Streamlit](https://github.com/explosion/spacy-streamlit)
[spaCy building blocks and visualizers for Streamlit apps. Created by](https://github.com/explosion/spacy-streamlit)
[@explosion](https://github.com/explosion)
.
`models = ["en_core_web_sm", "en_core_web_md"] spacy_streamlit.visualize(models, "Sundar Pichai is the CEO of Google.")`
[\
\
#### Streamlit Agraph](https://github.com/ChrisDelClea/streamlit-agraph)
[A Streamlit Graph Vis, based on](https://github.com/ChrisDelClea/streamlit-agraph)
[react-grah-vis](https://github.com/crubier/react-graph-vis)
. Created by [@ChrisDelClea](https://github.com/ChrisDelClea)
.
`from streamlit_agraph import agraph, Node, Edge, Config agraph(nodes=nodes, edges=edges, config=config)`
[\
\
#### Streamlit Lottie](https://github.com/andfanilo/streamlit-lottie)
[Integrate](https://github.com/andfanilo/streamlit-lottie)
[Lottie](https://lottiefiles.com/)
animations inside your Streamlit app. Created by [@andfanilo](https://github.com/andfanilo)
.
`lottie_hello = load_lottieurl("https://assets5.lottiefiles.com/packages/lf20_V9t630.json") st_lottie(lottie_hello, key="hello")`
[\
\
#### Plotly Events](https://github.com/null-jones/streamlit-plotly-events)
[Make Plotly charts interactive!. Created by](https://github.com/null-jones/streamlit-plotly-events)
[@null-jones](https://github.com/null-jones/)
.
`fig = px.line(x=[1], y=[1]) selected_points = plotly_events(fig)`
[\
\
#### Streamlit Extras](https://extras.streamlit.app/)
[A library with useful Streamlit extras. Created by](https://extras.streamlit.app/)
[@arnaudmiribel](https://github.com/arnaudmiribel/)
.
`chart += get_annotations_chart(annotations=[("Mar 01, 2008", "Pretty good day for GOOG"), ("Dec 01, 2007", "Something's going wrong for GOOG & AAPL"), ("Nov 01, 2008", "Market starts again thanks to..."), ("Dec 01, 2009", "Small crash for GOOG after..."),],) st.altair_chart(chart, use_container_width=True)`
[\
\
#### Plost](https://github.com/tvst/plost)
[A deceptively simple plotting library for Streamlit. Created by](https://github.com/tvst/plost)
[@tvst](https://github.com/tvst)
.
`import plost plost.line_chart(my_dataframe, x='time', y='stock_value', color='stock_name',)`
[\
\
#### HiPlot](https://github.com/facebookresearch/hiplot)
[High dimensional Interactive Plotting. Created by](https://github.com/facebookresearch/hiplot)
[@facebookresearch](https://github.com/facebookresearch)
.
`data = [{'dropout':0.1, 'lr': 0.001, 'loss': 10.0, 'optimizer': 'SGD'}, {'dropout':0.15, 'lr': 0.01, 'loss': 3.5, 'optimizer': 'Adam'}, {'dropout':0.3, 'lr': 0.1, 'loss': 4.5, 'optimizer': 'Adam'}] hip.Experiment.from_iterable(data).display()`
[\
\
#### ECharts](https://github.com/andfanilo/streamlit-echarts)
[High dimensional Interactive Plotting. Created by](https://github.com/andfanilo/streamlit-echarts)
[@andfanilo](https://github.com/andfanilo)
.
`from streamlit_echarts import st_echarts st_echarts(options=options)`
[\
\
#### Streamlit Folium](https://github.com/randyzwitch/streamlit-folium)
[Streamlit Component for rendering Folium maps. Created by](https://github.com/randyzwitch/streamlit-folium)
[@randyzwitch](https://github.com/randyzwitch)
.
`m = folium.Map(location=[39.949610, -75.150282], zoom_start=16) st_data = st_folium(m, width=725)`
[\
\
#### Spacy-Streamlit](https://github.com/explosion/spacy-streamlit)
[spaCy building blocks and visualizers for Streamlit apps. Created by](https://github.com/explosion/spacy-streamlit)
[@explosion](https://github.com/explosion)
.
`models = ["en_core_web_sm", "en_core_web_md"] spacy_streamlit.visualize(models, "Sundar Pichai is the CEO of Google.")`
[\
\
#### Streamlit Agraph](https://github.com/ChrisDelClea/streamlit-agraph)
[A Streamlit Graph Vis, based on](https://github.com/ChrisDelClea/streamlit-agraph)
[react-grah-vis](https://github.com/crubier/react-graph-vis)
. Created by [@ChrisDelClea](https://github.com/ChrisDelClea)
.
`from streamlit_agraph import agraph, Node, Edge, Config agraph(nodes=nodes, edges=edges, config=config)`
[\
\
#### Streamlit Lottie](https://github.com/andfanilo/streamlit-lottie)
[Integrate](https://github.com/andfanilo/streamlit-lottie)
[Lottie](https://lottiefiles.com/)
animations inside your Streamlit app. Created by [@andfanilo](https://github.com/andfanilo)
.
`lottie_hello = load_lottieurl("https://assets5.lottiefiles.com/packages/lf20_V9t630.json") st_lottie(lottie_hello, key="hello")`
[\
\
#### Plotly Events](https://github.com/null-jones/streamlit-plotly-events)
[Make Plotly charts interactive!. Created by](https://github.com/null-jones/streamlit-plotly-events)
[@null-jones](https://github.com/null-jones/)
.
`fig = px.line(x=[1], y=[1]) selected_points = plotly_events(fig)`
[\
\
#### Streamlit Extras](https://extras.streamlit.app/)
[A library with useful Streamlit extras. Created by](https://extras.streamlit.app/)
[@arnaudmiribel](https://github.com/arnaudmiribel/)
.
`chart += get_annotations_chart(annotations=[("Mar 01, 2008", "Pretty good day for GOOG"), ("Dec 01, 2007", "Something's going wrong for GOOG & AAPL"), ("Nov 01, 2008", "Market starts again thanks to..."), ("Dec 01, 2009", "Small crash for GOOG after..."),],) st.altair_chart(chart, use_container_width=True)`
Next
### [](#input-widgets)
Input widgets
[\
\
#### Button\
\
Display a button widget.\
\
`clicked = st.button("Click me")`](/develop/api-reference/widgets/st.button)
[\
\
#### Download button\
\
Display a download button widget.\
\
`st.download_button("Download file", file)`](/develop/api-reference/widgets/st.download_button)
[\
\
#### Form button\
\
Display a form submit button. For use with `st.form`.\
\
`st.form_submit_button("Sign up")`](/develop/api-reference/execution-flow/st.form_submit_button)
[\
\
#### Link button\
\
Display a link button.\
\
`st.link_button("Go to gallery", url)`](/develop/api-reference/widgets/st.link_button)
[\
\
#### Page link\
\
Display a link to another page in a multipage app.\
\
`st.page_link("app.py", label="Home", icon="🏠") st.page_link("pages/profile.py", label="My profile")`](/develop/api-reference/widgets/st.page_link)
[\
\
#### Checkbox\
\
Display a checkbox widget.\
\
`selected = st.checkbox("I agree")`](/develop/api-reference/widgets/st.checkbox)
[\
\
#### Color picker\
\
Display a color picker widget.\
\
`color = st.color_picker("Pick a color")`](/develop/api-reference/widgets/st.color_picker)
[\
\
#### Feedback\
\
Display a rating or sentiment button group.\
\
`st.feedback("stars")`](/develop/api-reference/widgets/st.feedback)
[\
\
#### Multiselect\
\
Display a multiselect widget. The multiselect widget starts as empty.\
\
`choices = st.multiselect("Buy", ["milk", "apples", "potatoes"])`](/develop/api-reference/widgets/st.multiselect)
[\
\
#### Pills\
\
Display a pill-button selection widget.\
\
`st.pills("Tags", ["Sports", "AI", "Politics"])`](/develop/api-reference/widgets/st.pills)
[\
\
#### Radio\
\
Display a radio button widget.\
\
`choice = st.radio("Pick one", ["cats", "dogs"])`](/develop/api-reference/widgets/st.radio)
[\
\
#### Segmented control\
\
Display a segmented-button selection widget.\
\
`st.segmented_control("Filter", ["Open", "Closed", "All"])`](/develop/api-reference/widgets/st.segmented_control)
[\
\
#### Selectbox\
\
Display a select widget.\
\
`choice = st.selectbox("Pick one", ["cats", "dogs"])`](/develop/api-reference/widgets/st.selectbox)
[\
\
#### Select-slider\
\
Display a slider widget to select items from a list.\
\
`size = st.select_slider("Pick a size", ["S", "M", "L"])`](/develop/api-reference/widgets/st.select_slider)
[\
\
#### Toggle\
\
Display a toggle widget.\
\
`activated = st.toggle("Activate")`](/develop/api-reference/widgets/st.toggle)
[\
\
#### Number input\
\
Display a numeric input widget.\
\
`choice = st.number_input("Pick a number", 0, 10)`](/develop/api-reference/widgets/st.number_input)
[\
\
#### Slider\
\
Display a slider widget.\
\
`number = st.slider("Pick a number", 0, 100)`](/develop/api-reference/widgets/st.slider)
[\
\
#### Date input\
\
Display a date input widget.\
\
`date = st.date_input("Your birthday")`](/develop/api-reference/widgets/st.date_input)
[\
\
#### Time input\
\
Display a time input widget.\
\
`time = st.time_input("Meeting time")`](/develop/api-reference/widgets/st.time_input)
[\
\
#### Chat input\
\
Display a chat input widget.\
\
`prompt = st.chat_input("Say something") if prompt: st.write(f"The user has sent: {prompt}")`](/develop/api-reference/chat/st.chat_input)
[\
\
#### Text-area\
\
Display a multi-line text input widget.\
\
`text = st.text_area("Text to translate")`](/develop/api-reference/widgets/st.text_area)
[\
\
#### Text input\
\
Display a single-line text input widget.\
\
`name = st.text_input("First name")`](/develop/api-reference/widgets/st.text_input)
[\
\
#### Audio input\
\
Display a widget that allows users to record with their microphone.\
\
`speech = st.audio_input("Record a voice message")`](/develop/api-reference/widgets/st.audio_input)
[\
\
#### Data editor\
\
Display a data editor widget.\
\
`edited = st.data_editor(df, num_rows="dynamic")`](/develop/api-reference/data/st.data_editor)
[\
\
#### File uploader\
\
Display a file uploader widget.\
\
`data = st.file_uploader("Upload a CSV")`](/develop/api-reference/widgets/st.file_uploader)
[\
\
#### Camera input\
\
Display a widget that allows users to upload images directly from a camera.\
\
`image = st.camera_input("Take a picture")`](/develop/api-reference/widgets/st.camera_input)
Third-party components
These are featured components created by our lovely community. For more examples and inspiration, check out our [Components Gallery](https://streamlit.io/components)
and [Streamlit Extras](https://extras.streamlit.app)
!
Previous
[\
\
#### Streamlit Chat](https://github.com/AI-Yash/st-chat)
[Streamlit Component for a Chatbot UI. Created by](https://github.com/AI-Yash/st-chat)
[@AI-Yash](https://github.com/AI-Yash)
.
`from streamlit_chat import message message("My message") message("Hello bot!", is_user=True) # align's the message to the right`
[\
\
#### Streamlit Option Menu](https://github.com/victoryhb/streamlit-option-menu)
[Select a single item from a list of options in a menu. Created by](https://github.com/victoryhb/streamlit-option-menu)
[@victoryhb](https://github.com/victoryhb)
.
`from streamlit_option_menu import option_menu option_menu("Main Menu", ["Home", 'Settings'], icons=['house', 'gear'], menu_icon="cast", default_index=1)`
[\
\
#### Streamlit Extras](https://extras.streamlit.app/)
[A library with useful Streamlit extras. Created by](https://extras.streamlit.app/)
[@arnaudmiribel](https://github.com/arnaudmiribel/)
.
`from streamlit_extras.stoggle import stoggle stoggle( "Click me!", """🥷 Surprise! Here's some additional content""",)`
[\
\
#### Streamlit Elements](https://github.com/okld/streamlit-elements)
[Create a draggable and resizable dashboard in Streamlit. Created by](https://github.com/okld/streamlit-elements)
[@okls](https://github.com/okls)
.
`from streamlit_elements import elements, mui, html with elements("new_element"): mui.Typography("Hello world")`
[\
\
#### Tags](https://github.com/gagan3012/streamlit-tags)
[Add tags to your Streamlit apps. Created by](https://github.com/gagan3012/streamlit-tags)
[@gagan3012](https://github.com/gagan3012)
.
`from streamlit_tags import st_tags st_tags(label='# Enter Keywords:', text='Press enter to add more', value=['Zero', 'One', 'Two'], suggestions=['five', 'six', 'seven', 'eight', 'nine', 'three', 'eleven', 'ten', 'four'], maxtags = 4, key='1')`
[\
\
#### Stqdm](https://github.com/Wirg/stqdm)
[The simplest way to handle a progress bar in streamlit app. Created by](https://github.com/Wirg/stqdm)
[@Wirg](https://github.com/Wirg)
.
`from stqdm import stqdm for _ in stqdm(range(50)): sleep(0.5)`
[\
\
#### Timeline](https://github.com/innerdoc/streamlit-timeline)
[Display a Timeline in Streamlit apps using](https://github.com/innerdoc/streamlit-timeline)
[TimelineJS](https://timeline.knightlab.com/)
. Created by [@innerdoc](https://github.com/innerdoc)
.
`from streamlit_timeline import timeline with open('example.json', "r") as f: timeline(f.read(), height=800)`
[\
\
#### Camera input live](https://github.com/blackary/streamlit-camera-input-live)
[Alternative for st.camera\_input which returns the webcam images live. Created by](https://github.com/blackary/streamlit-camera-input-live)
[@blackary](https://github.com/blackary)
.
`from camera_input_live import camera_input_live image = camera_input_live() st.image(value)`
[\
\
#### Streamlit Ace](https://github.com/okld/streamlit-ace)
[Ace editor component for Streamlit. Created by](https://github.com/okld/streamlit-ace)
[@okld](https://github.com/okld)
.
`from streamlit_ace import st_ace content = st_ace() content`
[\
\
#### Streamlit Chat](https://github.com/AI-Yash/st-chat)
[Streamlit Component for a Chatbot UI. Created by](https://github.com/AI-Yash/st-chat)
[@AI-Yash](https://github.com/AI-Yash)
.
`from streamlit_chat import message message("My message") message("Hello bot!", is_user=True) # align's the message to the right`
[\
\
#### Streamlit Option Menu](https://github.com/victoryhb/streamlit-option-menu)
[Select a single item from a list of options in a menu. Created by](https://github.com/victoryhb/streamlit-option-menu)
[@victoryhb](https://github.com/victoryhb)
.
`from streamlit_option_menu import option_menu option_menu("Main Menu", ["Home", 'Settings'], icons=['house', 'gear'], menu_icon="cast", default_index=1)`
[\
\
#### Streamlit Extras](https://extras.streamlit.app/)
[A library with useful Streamlit extras. Created by](https://extras.streamlit.app/)
[@arnaudmiribel](https://github.com/arnaudmiribel/)
.
`from streamlit_extras.stoggle import stoggle stoggle( "Click me!", """🥷 Surprise! Here's some additional content""",)`
[\
\
#### Streamlit Elements](https://github.com/okld/streamlit-elements)
[Create a draggable and resizable dashboard in Streamlit. Created by](https://github.com/okld/streamlit-elements)
[@okls](https://github.com/okls)
.
`from streamlit_elements import elements, mui, html with elements("new_element"): mui.Typography("Hello world")`
[\
\
#### Tags](https://github.com/gagan3012/streamlit-tags)
[Add tags to your Streamlit apps. Created by](https://github.com/gagan3012/streamlit-tags)
[@gagan3012](https://github.com/gagan3012)
.
`from streamlit_tags import st_tags st_tags(label='# Enter Keywords:', text='Press enter to add more', value=['Zero', 'One', 'Two'], suggestions=['five', 'six', 'seven', 'eight', 'nine', 'three', 'eleven', 'ten', 'four'], maxtags = 4, key='1')`
[\
\
#### Stqdm](https://github.com/Wirg/stqdm)
[The simplest way to handle a progress bar in streamlit app. Created by](https://github.com/Wirg/stqdm)
[@Wirg](https://github.com/Wirg)
.
`from stqdm import stqdm for _ in stqdm(range(50)): sleep(0.5)`
[\
\
#### Timeline](https://github.com/innerdoc/streamlit-timeline)
[Display a Timeline in Streamlit apps using](https://github.com/innerdoc/streamlit-timeline)
[TimelineJS](https://timeline.knightlab.com/)
. Created by [@innerdoc](https://github.com/innerdoc)
.
`from streamlit_timeline import timeline with open('example.json', "r") as f: timeline(f.read(), height=800)`
[\
\
#### Camera input live](https://github.com/blackary/streamlit-camera-input-live)
[Alternative for st.camera\_input which returns the webcam images live. Created by](https://github.com/blackary/streamlit-camera-input-live)
[@blackary](https://github.com/blackary)
.
`from camera_input_live import camera_input_live image = camera_input_live() st.image(value)`
[\
\
#### Streamlit Ace](https://github.com/okld/streamlit-ace)
[Ace editor component for Streamlit. Created by](https://github.com/okld/streamlit-ace)
[@okld](https://github.com/okld)
.
`from streamlit_ace import st_ace content = st_ace() content`
[\
\
#### Streamlit Chat](https://github.com/AI-Yash/st-chat)
[Streamlit Component for a Chatbot UI. Created by](https://github.com/AI-Yash/st-chat)
[@AI-Yash](https://github.com/AI-Yash)
.
`from streamlit_chat import message message("My message") message("Hello bot!", is_user=True) # align's the message to the right`
[\
\
#### Streamlit Option Menu](https://github.com/victoryhb/streamlit-option-menu)
[Select a single item from a list of options in a menu. Created by](https://github.com/victoryhb/streamlit-option-menu)
[@victoryhb](https://github.com/victoryhb)
.
`from streamlit_option_menu import option_menu option_menu("Main Menu", ["Home", 'Settings'], icons=['house', 'gear'], menu_icon="cast", default_index=1)`
[\
\
#### Streamlit Extras](https://extras.streamlit.app/)
[A library with useful Streamlit extras. Created by](https://extras.streamlit.app/)
[@arnaudmiribel](https://github.com/arnaudmiribel/)
.
`from streamlit_extras.stoggle import stoggle stoggle( "Click me!", """🥷 Surprise! Here's some additional content""",)`
Next
### [](#media-elements)
Media elements
[\
\
#### Image\
\
Display an image or list of images.\
\
`st.image(numpy_array) st.image(image_bytes) st.image(file) st.image("https://example.com/myimage.jpg")`](/develop/api-reference/media/st.image)
[\
\
#### Logo\
\
Display a logo in the upper-left corner of your app and its sidebar.\
\
`st.logo("logo.jpg")`](/develop/api-reference/media/st.logo)
[\
\
#### Audio\
\
Display an audio player.\
\
`st.audio(numpy_array) st.audio(audio_bytes) st.audio(file) st.audio("https://example.com/myaudio.mp3", format="audio/mp3")`](/develop/api-reference/media/st.audio)
[\
\
#### Video\
\
Display a video player.\
\
`st.video(numpy_array) st.video(video_bytes) st.video(file) st.video("https://example.com/myvideo.mp4", format="video/mp4")`](/develop/api-reference/media/st.video)
Third-party components
These are featured components created by our lovely community. For more examples and inspiration, check out our [Components Gallery](https://streamlit.io/components)
and [Streamlit Extras](https://extras.streamlit.app)
!
Previous
[\
\
#### Streamlit Cropper](https://github.com/turner-anderson/streamlit-cropper)
[A simple image cropper for Streamlit. Created by](https://github.com/turner-anderson/streamlit-cropper)
[@turner-anderson](https://github.com/turner-anderson)
.
`from streamlit_cropper import st_cropper st_cropper(img, realtime_update=realtime_update, box_color=box_color, aspect_ratio=aspect_ratio)`
[\
\
#### Image Coordinates](https://github.com/blackary/streamlit-image-coordinates)
[Get the coordinates of clicks on an image. Created by](https://github.com/blackary/streamlit-image-coordinates)
[@blackary](https://github.com/blackary/)
.
`from streamlit_image_coordinates import streamlit_image_coordinates streamlit_image_coordinates("https://placekitten.com/200/300")`
[\
\
#### Streamlit Lottie](https://github.com/andfanilo/streamlit-lottie)
[Integrate](https://github.com/andfanilo/streamlit-lottie)
[Lottie](https://lottiefiles.com/)
animations inside your Streamlit app. Created by [@andfanilo](https://github.com/andfanilo)
.
`lottie_hello = load_lottieurl("https://assets5.lottiefiles.com/packages/lf20_V9t630.json") st_lottie(lottie_hello, key="hello")`
[\
\
#### Streamlit Webrtc](https://github.com/whitphx/streamlit-webrtc)
[Handling and transmitting real-time video/audio streams with Streamlit. Created by](https://github.com/whitphx/streamlit-webrtc)
[@whitphx](https://github.com/whitphx)
.
`from streamlit_webrtc import webrtc_streamer webrtc_streamer(key="sample")`
[\
\
#### Drawable Canvas](https://github.com/andfanilo/streamlit-drawable-canvas)
[Provides a sketching canvas using](https://github.com/andfanilo/streamlit-drawable-canvas)
[Fabric.js](http://fabricjs.com/)
. Created by [@andfanilo](https://github.com/andfanilo)
.
`from streamlit_drawable_canvas import st_canvas st_canvas(fill_color="rgba(255, 165, 0, 0.3)", stroke_width=stroke_width, stroke_color=stroke_color, background_color=bg_color, background_image=Image.open(bg_image) if bg_image else None, update_streamlit=realtime_update, height=150, drawing_mode=drawing_mode, point_display_radius=point_display_radius if drawing_mode == 'point' else 0, key="canvas",)`
[\
\
#### Image Comparison](https://github.com/fcakyon/streamlit-image-comparison)
[Compare images with a slider using](https://github.com/fcakyon/streamlit-image-comparison)
[JuxtaposeJS](https://juxtapose.knightlab.com/)
. Created by [@fcakyon](https://github.com/fcakyon)
.
`from streamlit_image_comparison import image_comparison image_comparison(img1="image1.jpg", img2="image2.jpg",)`
[\
\
#### Streamlit Cropper](https://github.com/turner-anderson/streamlit-cropper)
[A simple image cropper for Streamlit. Created by](https://github.com/turner-anderson/streamlit-cropper)
[@turner-anderson](https://github.com/turner-anderson)
.
`from streamlit_cropper import st_cropper st_cropper(img, realtime_update=realtime_update, box_color=box_color, aspect_ratio=aspect_ratio)`
[\
\
#### Image Coordinates](https://github.com/blackary/streamlit-image-coordinates)
[Get the coordinates of clicks on an image. Created by](https://github.com/blackary/streamlit-image-coordinates)
[@blackary](https://github.com/blackary/)
.
`from streamlit_image_coordinates import streamlit_image_coordinates streamlit_image_coordinates("https://placekitten.com/200/300")`
[\
\
#### Streamlit Lottie](https://github.com/andfanilo/streamlit-lottie)
[Integrate](https://github.com/andfanilo/streamlit-lottie)
[Lottie](https://lottiefiles.com/)
animations inside your Streamlit app. Created by [@andfanilo](https://github.com/andfanilo)
.
`lottie_hello = load_lottieurl("https://assets5.lottiefiles.com/packages/lf20_V9t630.json") st_lottie(lottie_hello, key="hello")`
[\
\
#### Streamlit Webrtc](https://github.com/whitphx/streamlit-webrtc)
[Handling and transmitting real-time video/audio streams with Streamlit. Created by](https://github.com/whitphx/streamlit-webrtc)
[@whitphx](https://github.com/whitphx)
.
`from streamlit_webrtc import webrtc_streamer webrtc_streamer(key="sample")`
[\
\
#### Drawable Canvas](https://github.com/andfanilo/streamlit-drawable-canvas)
[Provides a sketching canvas using](https://github.com/andfanilo/streamlit-drawable-canvas)
[Fabric.js](http://fabricjs.com/)
. Created by [@andfanilo](https://github.com/andfanilo)
.
`from streamlit_drawable_canvas import st_canvas st_canvas(fill_color="rgba(255, 165, 0, 0.3)", stroke_width=stroke_width, stroke_color=stroke_color, background_color=bg_color, background_image=Image.open(bg_image) if bg_image else None, update_streamlit=realtime_update, height=150, drawing_mode=drawing_mode, point_display_radius=point_display_radius if drawing_mode == 'point' else 0, key="canvas",)`
[\
\
#### Image Comparison](https://github.com/fcakyon/streamlit-image-comparison)
[Compare images with a slider using](https://github.com/fcakyon/streamlit-image-comparison)
[JuxtaposeJS](https://juxtapose.knightlab.com/)
. Created by [@fcakyon](https://github.com/fcakyon)
.
`from streamlit_image_comparison import image_comparison image_comparison(img1="image1.jpg", img2="image2.jpg",)`
[\
\
#### Streamlit Cropper](https://github.com/turner-anderson/streamlit-cropper)
[A simple image cropper for Streamlit. Created by](https://github.com/turner-anderson/streamlit-cropper)
[@turner-anderson](https://github.com/turner-anderson)
.
`from streamlit_cropper import st_cropper st_cropper(img, realtime_update=realtime_update, box_color=box_color, aspect_ratio=aspect_ratio)`
[\
\
#### Image Coordinates](https://github.com/blackary/streamlit-image-coordinates)
[Get the coordinates of clicks on an image. Created by](https://github.com/blackary/streamlit-image-coordinates)
[@blackary](https://github.com/blackary/)
.
`from streamlit_image_coordinates import streamlit_image_coordinates streamlit_image_coordinates("https://placekitten.com/200/300")`
[\
\
#### Streamlit Lottie](https://github.com/andfanilo/streamlit-lottie)
[Integrate](https://github.com/andfanilo/streamlit-lottie)
[Lottie](https://lottiefiles.com/)
animations inside your Streamlit app. Created by [@andfanilo](https://github.com/andfanilo)
.
`lottie_hello = load_lottieurl("https://assets5.lottiefiles.com/packages/lf20_V9t630.json") st_lottie(lottie_hello, key="hello")`
Next
### [](#layouts-and-containers)
Layouts and containers
[\
\
#### Columns\
\
Insert containers laid out as side-by-side columns.\
\
`col1, col2 = st.columns(2) col1.write("this is column 1") col2.write("this is column 2")`](/develop/api-reference/layout/st.columns)
[\
\
#### Container\
\
Insert a multi-element container.\
\
`c = st.container() st.write("This will show last") c.write("This will show first") c.write("This will show second")`](/develop/api-reference/layout/st.container)
[\
\
#### Modal dialog\
\
Insert a modal dialog that can rerun independently from the rest of the script.\
\
`@st.dialog("Sign up") def email_form(): name = st.text_input("Name") email = st.text_input("Email")`](/develop/api-reference/execution-flow/st.dialog)
[\
\
#### Empty\
\
Insert a single-element container.\
\
`c = st.empty() st.write("This will show last") c.write("This will be replaced") c.write("This will show first")`](/develop/api-reference/layout/st.empty)
[\
\
#### Expander\
\
Insert a multi-element container that can be expanded/collapsed.\
\
`with st.expander("Open to see more"): st.write("This is more content")`](/develop/api-reference/layout/st.expander)
[\
\
#### Popover\
\
Insert a multi-element popover container that can be opened/closed.\
\
`with st.popover("Settings"): st.checkbox("Show completed")`](/develop/api-reference/layout/st.popover)
[\
\
#### Sidebar\
\
Display items in a sidebar.\
\
`st.sidebar.write("This lives in the sidebar") st.sidebar.button("Click me!")`](/develop/api-reference/layout/st.sidebar)
[\
\
#### Tabs\
\
Insert containers separated into tabs.\
\
`tab1, tab2 = st.tabs(["Tab 1", "Tab2"]) tab1.write("this is tab 1") tab2.write("this is tab 2")`](/develop/api-reference/layout/st.tabs)
Third-party components
These are featured components created by our lovely community. For more examples and inspiration, check out our [Components Gallery](https://streamlit.io/components)
and [Streamlit Extras](https://extras.streamlit.app)
!
[\
\
#### Streamlit Elements](https://github.com/okld/streamlit-elements)
[Create a draggable and resizable dashboard in Streamlit. Created by](https://github.com/okld/streamlit-elements)
[@okls](https://github.com/okls)
.
`from streamlit_elements import elements, mui, html with elements("new_element"): mui.Typography("Hello world")`
[\
\
#### Pydantic](https://github.com/lukasmasuch/streamlit-pydantic)
[Auto-generate Streamlit UI from Pydantic Models and Dataclasses. Created by](https://github.com/lukasmasuch/streamlit-pydantic)
[@lukasmasuch](https://github.com/lukasmasuch)
.
`import streamlit_pydantic as sp sp.pydantic_form(key="my_form", model=ExampleModel)`
[\
\
#### Streamlit Pages](https://github.com/blackary/st_pages)
[An experimental version of Streamlit Multi-Page Apps. Created by](https://github.com/blackary/st_pages)
[@blackary](https://github.com/blackary)
.
`from st_pages import Page, show_pages, add_page_title show_pages([ Page("streamlit_app.py", "Home", "🏠"), Page("other_pages/page2.py", "Page 2", ":books:"), ])`
### [](#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.
[\
\
#### Chat input\
\
Display a chat input widget.\
\
`prompt = st.chat_input("Say something") if prompt: st.write(f"The user has sent: {prompt}")`](/develop/api-reference/chat/st.chat_input)
[\
\
#### Chat message\
\
Insert a chat message container.\
\
`import numpy as np with st.chat_message("user"): st.write("Hello 👋") st.line_chart(np.random.randn(30, 3))`](/develop/api-reference/chat/st.chat_message)
[\
\
#### Status container\
\
Display output of long-running tasks in a container.\
\
`with st.status('Running'): do_something_slow()`](/develop/api-reference/status/st.status)
[#### st.write\_stream\
\
Write generators or streams to the app with a typewriter effect.\
\
`st.write_stream(my_generator) st.write_stream(my_llm_stream)`](/develop/api-reference/write-magic/st.write_stream)
### [](#status-elements)
Status elements
[\
\
#### Progress bar\
\
Display a progress bar.\
\
`for i in range(101): st.progress(i) do_something_slow()`](/develop/api-reference/status/st.progress)
[\
\
#### Spinner\
\
Temporarily displays a message while executing a block of code.\
\
`with st.spinner("Please wait..."): do_something_slow()`](/develop/api-reference/status/st.spinner)
[\
\
#### Status container\
\
Display output of long-running tasks in a container.\
\
`with st.status('Running'): do_something_slow()`](/develop/api-reference/status/st.status)
[\
\
#### Toast\
\
Briefly displays a toast message in the bottom-right corner.\
\
`st.toast('Butter!', icon='🧈')`](/develop/api-reference/status/st.toast)
[\
\
#### Balloons\
\
Display celebratory balloons!\
\
`do_something() # Celebrate when all done! st.balloons()`](/develop/api-reference/status/st.balloons)
[\
\
#### Snowflakes\
\
Display celebratory snowflakes!\
\
`do_something() # Celebrate when all done! st.snow()`](/develop/api-reference/status/st.snow)
[\
\
#### Success box\
\
Display a success message.\
\
`st.success("Match found!")`](/develop/api-reference/status/st.success)
[\
\
#### Info box\
\
Display an informational message.\
\
`st.info("Dataset is updated every day at midnight.")`](/develop/api-reference/status/st.info)
[\
\
#### Warning box\
\
Display warning message.\
\
`st.warning("Unable to fetch image. Skipping...")`](/develop/api-reference/status/st.warning)
[\
\
#### Error box\
\
Display error message.\
\
`st.error("We encountered an error")`](/develop/api-reference/status/st.error)
[\
\
#### Exception output\
\
Display an exception.\
\
`e = RuntimeError("This is an exception of type RuntimeError") st.exception(e)`](/develop/api-reference/status/st.exception)
Third-party components
These are featured components created by our lovely community. For more examples and inspiration, check out our [Components Gallery](https://streamlit.io/components)
and [Streamlit Extras](https://extras.streamlit.app)
!
[\
\
#### Stqdm](https://github.com/Wirg/stqdm)
[The simplest way to handle a progress bar in streamlit app. Created by](https://github.com/Wirg/stqdm)
[@Wirg](https://github.com/Wirg)
.
`from stqdm import stqdm for _ in stqdm(range(50)): sleep(0.5)`
[\
\
#### Custom notification box](https://github.com/Socvest/streamlit-custom-notification-box)
[A custom notification box with the ability to close it out. Created by](https://github.com/Socvest/streamlit-custom-notification-box)
[@Socvest](https://github.com/Socvest)
.
`from streamlit_custom_notification_box import custom_notification_box styles = {'material-icons':{'color': 'red'}, 'text-icon-link-close-container': {'box-shadow': '#3896de 0px 4px'}, 'notification-text': {'':''}, 'close-button':{'':''}, 'link':{'':''}} custom_notification_box(icon='info', textDisplay='We are almost done with your registration...', externalLink='more info', url='#', styles=styles, key="foo")`
[\
\
#### Streamlit Extras](https://extras.streamlit.app/)
[A library with useful Streamlit extras. Created by](https://extras.streamlit.app/)
[@arnaudmiribel](https://github.com/arnaudmiribel/)
.
`from streamlit_extras.let_it_rain import rain rain(emoji="🎈", font_size=54, falling_speed=5, animation_length="infinite",)`
[](#app-logic-and-configuration)
App logic and configuration
--------------------------------------------------------------
### [](#authentication-and-user-info)
Authentication and user info
[#### Log in a user\
\
`st.login()` starts an authentication flow with an identity provider.\
\
`st.login()`](/develop/api-reference/user/st.login)
[#### Log out a user\
\
`st.logout()` removes a user's identity information.\
\
`st.logout()`](/develop/api-reference/user/st.logout)
[#### User info\
\
`st.experimental_user` returns information about a logged-in user.\
\
`if st.experimental_user.is_logged_in: st.write(f"Welcome back, {st.experimental_user.name}!")`](/develop/api-reference/user/st.user)
### [](#navigation-and-pages)
Navigation and pages
[\
\
#### Navigation\
\
Configure the available pages in a multipage app.\
\
`st.navigation({ "Your account" : [log_out, settings], "Reports" : [overview, usage], "Tools" : [search] })`](/develop/api-reference/navigation/st.navigation)
[\
\
#### Page\
\
Define a page in a multipage app.\
\
`home = st.Page( "home.py", title="Home", icon=":material/home:" )`](/develop/api-reference/navigation/st.page)
[\
\
#### Page link\
\
Display a link to another page in a multipage app.\
\
`st.page_link("app.py", label="Home", icon="🏠") st.page_link("pages/profile.py", label="My profile")`](/develop/api-reference/widgets/st.page_link)
[#### Switch page\
\
Programmatically navigates to a specified page.\
\
`st.switch_page("pages/my_page.py")`](/develop/api-reference/navigation/st.switch_page)
### [](#execution-flow)
Execution flow
[\
\
#### Modal dialog\
\
Insert a modal dialog that can rerun independently from the rest of the script.\
\
`@st.dialog("Sign up") def email_form(): name = st.text_input("Name") email = st.text_input("Email")`](/develop/api-reference/execution-flow/st.dialog)
[#### Forms\
\
Create a form that batches elements together with a “Submit" button.\
\
`with st.form(key='my_form'): name = st.text_input("Name") email = st.text_input("Email") st.form_submit_button("Sign up")`](/develop/api-reference/execution-flow/st.form)
[#### Fragments\
\
Define a fragment to rerun independently from the rest of the script.\
\
`@st.fragment(run_every="10s") def fragment(): df = get_data() st.line_chart(df)`](/develop/api-reference/execution-flow/st.fragment)
[#### Rerun script\
\
Rerun the script immediately.\
\
`st.rerun()`](/develop/api-reference/execution-flow/st.rerun)
[#### Stop execution\
\
Stops execution immediately.\
\
`st.stop()`](/develop/api-reference/execution-flow/st.stop)
Third-party components
These are featured components created by our lovely community. For more examples and inspiration, check out our [Components Gallery](https://streamlit.io/components)
and [Streamlit Extras](https://extras.streamlit.app)
!
[\
\
#### Autorefresh](https://github.com/kmcgrady/streamlit-autorefresh)
[Force a refresh without tying up a script. Created by](https://github.com/kmcgrady/streamlit-autorefresh)
[@kmcgrady](https://github.com/kmcgrady)
.
`from streamlit_autorefresh import st_autorefresh st_autorefresh(interval=2000, limit=100, key="fizzbuzzcounter")`
[\
\
#### Pydantic](https://github.com/lukasmasuch/streamlit-pydantic)
[Auto-generate Streamlit UI from Pydantic Models and Dataclasses. Created by](https://github.com/lukasmasuch/streamlit-pydantic)
[@lukasmasuch](https://github.com/lukasmasuch)
.
`import streamlit_pydantic as sp sp.pydantic_form(key="my_form", model=ExampleModel)`
[\
\
#### Streamlit Pages](https://github.com/blackary/st_pages)
[An experimental version of Streamlit Multi-Page Apps. Created by](https://github.com/blackary/st_pages)
[@blackary](https://github.com/blackary)
.
`from st_pages import Page, show_pages, add_page_title show_pages([ Page("streamlit_app.py", "Home", "🏠"), Page("other_pages/page2.py", "Page 2", ":books:"), ])`
### [](#caching-and-state)
Caching and state
[#### Cache data\
\
Function decorator to cache functions that return data (e.g. dataframe transforms, database queries, ML inference).\
\
`@st.cache_data def long_function(param1, param2): # Perform expensive computation here or # fetch data from the web here return data`](/develop/api-reference/caching-and-state/st.cache_data)
[#### Cache resource\
\
Function decorator to cache functions that return global resources (e.g. database connections, ML models).\
\
`@st.cache_resource def init_model(): # Return a global resource here return pipeline( "sentiment-analysis", model="distilbert-base-uncased-finetuned-sst-2-english" )`](/develop/api-reference/caching-and-state/st.cache_resource)
[#### Session state\
\
Session state is a way to share variables between reruns, for each user session.\
\
`st.session_state['key'] = value`](/develop/api-reference/caching-and-state/st.session_state)
[#### Query parameters\
\
Get, set, or clear the query parameters that are shown in the browser's URL bar.\
\
`st.query_params[key] = value st.query_params.clear()`](/develop/api-reference/caching-and-state/st.query_params)
[#### Context\
\
`st.context` provides a read-only interface to access cookies and headers.\
\
`st.context.cookies st.context.headers`](/develop/api-reference/caching-and-state/st.context)
### [](#connections-and-databases)
Connections and databases
#### [](#setup-your-connection)
Setup your connection
[\
\
#### Create a connection\
\
Connect to a data source or API\
\
`conn = st.connection('pets_db', type='sql') pet_owners = conn.query('select * from pet_owners') st.dataframe(pet_owners)`](/develop/api-reference/connections/st.connection)
#### [](#built-in-connections)
Built-in connections
[\
\
#### SnowflakeConnection\
\
A connection to Snowflake.\
\
`conn = st.connection('snowflake')`](/develop/api-reference/connections/st.connections.snowflakeconnection)
[\
\
#### SQLConnection\
\
A connection to a SQL database using SQLAlchemy.\
\
`conn = st.connection('sql')`](/develop/api-reference/connections/st.connections.sqlconnection)
#### [](#build-your-own-connections)
Build your own connections
[#### Connection base class\
\
Build your own connection with `BaseConnection`.\
\
`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)`](/develop/api-reference/connections/st.connections.baseconnection)
#### [](#secrets-management)
Secrets management
[#### Secrets singleton\
\
Access secrets from a local TOML file.\
\
`key = st.secrets["OpenAI_key"]`](/develop/api-reference/connections/st.secrets)
[#### Secrets file\
\
Save your secrets in a per-project or per-profile TOML file.\
\
`OpenAI_key = ""`](/develop/api-reference/connections/secrets.toml)
Third-party components
These are featured components created by our lovely community. For more examples and inspiration, check out our [Components Gallery](https://streamlit.io/components)
and [Streamlit Extras](https://extras.streamlit.app)
!
[\
\
#### Authenticator](https://github.com/mkhorasani/Streamlit-Authenticator)
[A secure authentication module to validate user credentials. Created by](https://github.com/mkhorasani/Streamlit-Authenticator)
[@mkhorasani](https://github.com/mkhorasani)
.
`import streamlit_authenticator as stauth authenticator = stauth.Authenticate( config['credentials'], config['cookie']['name'], config['cookie']['key'], config['cookie']['expiry_days'], config['preauthorized'])`
[\
\
#### WS localStorage](https://github.com/gagangoku/streamlit-ws-localstorage)
[A simple synchronous way of accessing localStorage from your app. Created by](https://github.com/gagangoku/streamlit-ws-localstorage)
[@gagangoku](https://github.com/gagangoku)
.
`from streamlit_ws_localstorage import injectWebsocketCode ret = conn.setLocalStorageVal(key='k1', val='v1') st.write('ret: ' + ret)`
[\
\
#### Streamlit Auth0](https://github.com/conradbez/streamlit-auth0)
[The fastest way to provide comprehensive login inside Streamlit. Created by](https://github.com/conradbez/streamlit-auth0)
[@conradbez](https://github.com/conradbez)
.
`from auth0_component import login_button user_info = login_button(clientId, domain = domain) st.write(user_info)`
### [](#custom-components)
Custom Components
[#### Declare a component\
\
Create and register a custom component.\
\
`from st.components.v1 import declare_component declare_component( "custom_slider", "/frontend", )`](/develop/api-reference/custom-components/st.components.v1.declare_component)
[#### HTML\
\
Display an HTML string in an iframe.\
\
`from st.components.v1 import html html( "Foo bar.
" )`](/develop/api-reference/custom-components/st.components.v1.html)
[#### iframe\
\
Load a remote URL in an iframe.\
\
`from st.components.v1 import iframe iframe( "docs.streamlit.io" )`](/develop/api-reference/custom-components/st.components.v1.iframe)
### [](#configuration)
Configuration
[#### Configuration file\
\
Configures the default settings for your app.\
\
`your-project/ ├── .streamlit/ │ └── config.toml └── your_app.py`](/develop/api-reference/configuration/config.toml)
[#### Get config option\
\
Retrieve a single configuration option.\
\
`st.get_option("theme.primaryColor")`](/develop/api-reference/configuration/st.get_option)
[#### Set config option\
\
Set a single configuration option. (This is very limited.)\
\
`st.set_option("deprecation.showPyplotGlobalUse", False)`](/develop/api-reference/configuration/st.set_option)
[#### Set page title, favicon, and more\
\
Configures the default settings of the page.\
\
`st.set_page_config( page_title="My app", page_icon=":shark:", )`](/develop/api-reference/configuration/st.set_page_config)
[](#developer-tools)
Developer tools
--------------------------------------
### [](#app-testing)
App testing
[#### st.testing.v1.AppTest\
\
`st.testing.v1.AppTest` simulates a running Streamlit app for testing.\
\
`from streamlit.testing.v1 import AppTest at = AppTest.from_file("streamlit_app.py") at.secrets["WORD"] = "Foobar" at.run() assert not at.exception at.text_input("word").input("Bazbat").run() assert at.warning[0].value == "Try again."`](/develop/api-reference/app-testing/st.testing.v1.apptest)
[#### AppTest.from\_file\
\
`st.testing.v1.AppTest.from_file` initializes a simulated app from a file.\
\
`from streamlit.testing.v1 import AppTest at = AppTest.from_file("streamlit_app.py") at.run()`](/develop/api-reference/app-testing/st.testing.v1.apptest#apptestfrom_file)
[#### AppTest.from\_string\
\
`st.testing.v1.AppTest.from_string` initializes a simulated app from a string.\
\
`from streamlit.testing.v1 import AppTest at = AppTest.from_string(app_script_as_string) at.run()`](/develop/api-reference/app-testing/st.testing.v1.apptest#apptestfrom_string)
[#### AppTest.from\_function\
\
`st.testing.v1.AppTest.from_function` initializes a simulated app from a function.\
\
`from streamlit.testing.v1 import AppTest at = AppTest.from_function(app_script_as_callable) at.run()`](/develop/api-reference/app-testing/st.testing.v1.apptest#apptestfrom_function)
[#### Block\
\
A representation of container elements, including:\
\
* `st.chat_message`\
* `st.columns`\
* `st.sidebar`\
* `st.tabs`\
* The main body of the app.\
\
`# at.sidebar returns a Block at.sidebar.button[0].click().run() assert not at.exception`](/develop/api-reference/app-testing/testing-element-classes#sttestingv1element_treeblock)
[#### Element\
\
The base class for representation of all elements, including:\
\
* `st.title`\
* `st.header`\
* `st.markdown`\
* `st.dataframe`\
\
`# at.title returns a sequence of Title # Title inherits from Element assert at.title[0].value == "My awesome app"`](/develop/api-reference/app-testing/testing-element-classes#sttestingv1element_treeelement)
[#### Button\
\
A representation of `st.button` and `st.form_submit_button`.\
\
`at.button[0].click().run()`](/develop/api-reference/app-testing/testing-element-classes#sttestingv1element_treebutton)
[#### ChatInput\
\
A representation of `st.chat_input`.\
\
`at.chat_input[0].set_value("What is Streamlit?").run()`](/develop/api-reference/app-testing/testing-element-classes#sttestingv1element_treechatinput)
[#### Checkbox\
\
A representation of `st.checkbox`.\
\
`at.checkbox[0].check().run()`](/develop/api-reference/app-testing/testing-element-classes#sttestingv1element_treecheckbox)
[#### ColorPicker\
\
A representation of `st.color_picker`.\
\
`at.color_picker[0].pick("#FF4B4B").run()`](/develop/api-reference/app-testing/testing-element-classes#sttestingv1element_treecolorpicker)
[#### DateInput\
\
A representation of `st.date_input`.\
\
`release_date = datetime.date(2023, 10, 26) at.date_input[0].set_value(release_date).run()`](/develop/api-reference/app-testing/testing-element-classes#sttestingv1element_treedateinput)
[#### Multiselect\
\
A representation of `st.multiselect`.\
\
`at.multiselect[0].select("New York").run()`](/develop/api-reference/app-testing/testing-element-classes#sttestingv1element_treemultiselect)
[#### NumberInput\
\
A representation of `st.number_input`.\
\
`at.number_input[0].increment().run()`](/develop/api-reference/app-testing/testing-element-classes#sttestingv1element_treenumberinput)
[#### Radio\
\
A representation of `st.radio`.\
\
`at.radio[0].set_value("New York").run()`](/develop/api-reference/app-testing/testing-element-classes#sttestingv1element_treeradio)
[#### SelectSlider\
\
A representation of `st.select_slider`.\
\
`at.select_slider[0].set_range("A","C").run()`](/develop/api-reference/app-testing/testing-element-classes#sttestingv1element_treeselectslider)
[#### Selectbox\
\
A representation of `st.selectbox`.\
\
`at.selectbox[0].select("New York").run()`](/develop/api-reference/app-testing/testing-element-classes#sttestingv1element_treeselectbox)
[#### Slider\
\
A representation of `st.slider`.\
\
`at.slider[0].set_range(2,5).run()`](/develop/api-reference/app-testing/testing-element-classes#sttestingv1element_treeslider)
[#### TextArea\
\
A representation of `st.text_area`.\
\
`at.text_area[0].input("Streamlit is awesome!").run()`](/develop/api-reference/app-testing/testing-element-classes#sttestingv1element_treetextarea)
[#### TextInput\
\
A representation of `st.text_input`.\
\
`at.text_input[0].input("Streamlit").run()`](/develop/api-reference/app-testing/testing-element-classes#sttestingv1element_treetextinput)
[#### TimeInput\
\
A representation of `st.time_input`.\
\
`at.time_input[0].increment().run()`](/develop/api-reference/app-testing/testing-element-classes#sttestingv1element_treetimeinput)
[#### Toggle\
\
A representation of `st.toggle`.\
\
`at.toggle[0].set_value("True").run()`](/develop/api-reference/app-testing/testing-element-classes#sttestingv1element_treetoggle)
Third-party components
These are featured components created by our lovely community. For more examples and inspiration, check out our [Components Gallery](https://streamlit.io/components)
and [Streamlit Extras](https://extras.streamlit.app)
!
[\
\
#### Pandas Profiling](https://github.com/okld/streamlit-pandas-profiling)
[Pandas profiling component for Streamlit. Created by](https://github.com/okld/streamlit-pandas-profiling)
[@okld](https://github.com/okld/)
.
`df = pd.read_csv("https://storage.googleapis.com/tf-datasets/titanic/train.csv") pr = df.profile_report() st_profile_report(pr)`
[\
\
#### Streamlit Ace](https://github.com/okld/streamlit-ace)
[Ace editor component for Streamlit. Created by](https://github.com/okld/streamlit-ace)
[@okld](https://github.com/okld)
.
`from streamlit_ace import st_ace content = st_ace() content`
[\
\
#### Streamlit Analytics](https://github.com/jrieke/streamlit-analytics)
[Track & visualize user interactions with your streamlit app. Created by](https://github.com/jrieke/streamlit-analytics)
[@jrieke](https://github.com/jrieke)
.
`import streamlit_analytics with streamlit_analytics.track(): st.text_input("Write something")`
[Previous: Concepts](/develop/concepts)
[Next: Write & magic](/develop/api-reference/write-magic)
_forum_
### Still have questions?
Our [forums](https://discuss.streamlit.io)
are full of helpful information and Streamlit experts.
---