Your Cart
Loading
How to Build and Deploy a “Hello World” Web App with Streamlit Community Cloud and GitHub

Build and Deploy a “Hello World” Web App with Streamlit Community Cloud + GitHub

In this mini-guide, you’ll build a simple Python web app, upload your code to GitHub, and deploy it for free using Streamlit Community Cloud. By the end, you’ll have a live web app with a shareable URL.


Tools you’ll use

  • Streamlit: Builds interactive web apps using Python.
  • GitHub: Stores and manages your application code in a repository.
  • Streamlit Community Cloud: Deploys your GitHub repository as a live web app.


1. Create a GitHub Repository

  1. Go to GitHub and sign in or create an account.
  2. Click the + icon in the top-right corner and select New repository.
  3. Name your repository hello-streamlit.
  4. Set the repository visibility to Public.
  5. Click Create repository.


2. Add Your App Code (app.py)

  1. On your repository page, click creating a new file (in the Quick setup section).
  2. Name the file app.py.
  3. Paste the following Python code:

How to Build and Deploy a “Hello World” Web App with Streamlit Community Cloud and GitHub


Click Commit changes to save the file to your repository.


Understanding the code

  • import streamlit tells Python to load the Streamlit package.
  • as st gives that package the shorter name st.
  • st.title("Hello, World!") displays a title in your web app.


3. Add a Dependencies File (requirements.txt)

A requirements.txt file lists the Python packages your application needs. It helps Streamlit install the required dependencies during deployment.

  1. In your repository, click Add file → Create new file.
  2. Name the file requirements.txt
  3. Add the following line:

How to Build and Deploy a “Hello World” Web App with Streamlit Community Cloud and GitHub


Click Commit changes.


Dependencies are the packages your application needs to work.


4. Deploy on Streamlit Community Cloud

  1. Go to Streamlit Community Cloud and sign in with your GitHub account.
  2. Click Create app.
  3. Select Deploy a public app from GitHub.
  4. Configure your deployment settings:
  • Repository: Select your repository, such as your username/hello-streamlit.
  • Branch: main (or the branch containing your files).
  • Main file path: app.py.


Click Deploy.


Streamlit will build and launch your application. Once deployment is complete, you’ll receive a live URL that you can open in your browser and share with others.


Congratulations! You’ve built and deployed your first Streamlit web app using Python and GitHub.



Subscribe to our newsletter

Get notified when new PDF mini-guides, resources, templates, bundles, ebooks, and courses are released.