Resources

Deploy your work to Posit Connect Cloud

*Deploy your data science content with Posit Connect Cloud!* Daniel Chen walks you through deploying a Shiny for Python app to Connect Cloud, sharing your content, and updating it via GitHub. While this video focuses on Shiny for Python, Posit Connect Cloud also supports Quarto, Streamlit, Jupyter, and more! Use Posit Connect Cloud to share your PydyTuesday work with the world. Learn more here: https://github.com/posit-dev/python-tidytuesday. Resources: * Shiny app code: https://github.com/posit-dev/py-shiny-templates/tree/main/dashboard * Posit Connect Cloud: https://connect.posit.cloud/ * Shiny for Python: https://shiny.posit.co/py/ * Other videos in this PydyTuesday playlist: https://www.youtube.com/playlist?list=PL9HYL-VRX0oSDQjicFMLIIdcLv5NuvDp9 #pythoncontent

Feb 18, 2025
4 min

image: thumbnail.jpg

Transcript#

This transcript was generated automatically and may contain errors.

Let's show you how to deploy your data science content to Posit Connect Cloud. In this example, we'll be deploying a Shiny for Python application, but Posit Connect Cloud is not limited to just this framework.

Setting up the GitHub repository

Deploying on Connect Cloud starts with the GitHub repository. Here, we'll create an empty repository named dashboard, and then clone it down to our computer.

Next, we'll create our Shiny for Python application. Here, we'll use an existing Shiny for Python template and save it into our cloned repository.

We'll follow the instructions to install the template dependencies and run it in Positron.

Running the app locally

Let's run this application locally first. We'll open the app.py file and click the play button from the Shiny VS Code extension.

We can see the reactivity of the application when we change the checkboxes.

Deploying to Connect Cloud

Next, we need to get all the code to our GitHub repository. Now that the code is on GitHub, let's go to Connect Cloud and deploy our application.

After you log in and connect your GitHub account to Connect Cloud, we can click publish, Shiny, and select our repository.

Our current application is on the main branch and is named app.py. We then hit publish.

Our app is now published at the URL.

Updating and sharing your content

Now, let's make a change to the capitalization of the dashboard title. The changes will automatically republish the application. You do not need to click the republish button by default.

In the content settings, by clicking on it here, you have the option to turn off auto-republish and also the option to give your content a custom URL. Posit Connect Cloud is an easy way to deploy straight from an existing GitHub repository and share your data science work.

Posit Connect Cloud is an easy way to deploy straight from an existing GitHub repository and share your data science work.