Skip to content

Setup

By the end of this chapter, you will have successfully created and set up a GitHub project using the Streamlit Starter Kit. This starter kit provides a solid foundation for building interactive web applications with Streamlit, a powerful Python library for creating data-driven apps.

In this chapter, we will guide you through the following steps:

  • Forking the Streamlit Starter Kit repository to your GitHub account
  • Cloning the forked repository to your local machine
  • Configuring the project settings
  • Optionally Running the starter app locally to ensure everything is set up correctly

Let's get started!

What is required

To follow along with this tutorial and set up your project successfully, you'll need the following tools and accounts:

Please ensure you have all these tools and accounts set up before proceeding with the tutorial. In the following sections, we'll guide you through the process of setting up your GitHub project using the Streamlit Starter Kit.

Creating a Project

Let us create a base Streamlit project from scratch using Streamlit application starter kit.

Navigate to the folder where you want to create your application,

cd <directory where you want to create your project>

Create the application folder for the rest of the demo we will call this as st-ml-app and for easy reference we will export to an environment variable named $TUTORIAL_HOME,

export TUTORIAL_HOME='st-ml-app'
mkdir -p $TUTORIAL_HOME
cd $TUTORIAL_HOME

You can either directly use the template from the repo https://github.com/streamlit/app-starter-kit,

Streamlit Application Starter Kit

Once you fork the repository clone the same to $TUTORIAL_HOME.

git clone <your template repo> $TUTORIAL_HOME

(OR)

We can use GitHub CLI and create a remote git repository under your GitHub account using the same template,

gh repo create st-ml-app \
   --template='streamlit/app-starter-kit' \
   --public 

Clone the created repository to current directory,

gh repo clone st-ml-app .

Choice of Development Environment

This tutorial can be run in many ways

Note

For this demo we will do all the setup locally on our machines.

Once you have all that lets get to next chapter where we will deploy the bare bone application Streamlit community cloud.