chapter two

2 Getting started with Streamlit

 

This chapter covers

  • Setting up your development environment
  • The Streamlit development workflow
  • Building and running your first Streamlit app

Welcome to chapter 2. This is where the rubber hits the road! By the end of this chapter, you’ll be interacting with your first very own Streamlit app!

This book is not just about teaching you Streamlit. It’s also about helping you stay productive with Streamlit and well positioned to develop real-world apps. Before we jump into writing code, let’s take some time to set up your development environment. Specifically, we’ll discuss three key workflow considerations: version control with Git, code editing tools, and virtual environments.

Next, we’ll examine the workflow you’ll follow when coding with Streamlit so you know what to expect as you build apps throughout this book. After that, we’ll work through a step-by-step process to create your first app: a password checker.

Excited yet? Let’s dive in!

2.1 Getting Streamlit up and running

Before building any apps, you need to install Streamlit and get it ready to go. This involves two steps:

2.2 Setting up your development environment

2.2.1 Version control with Git

2.2.2 Code editors

2.2.3 Virtual environments

2.3 Running Streamlit for the first time

2.4 The Streamlit development workflow

2.5 Building your first app

2.5.1 A password checker

2.5.2 Logic flow

2.5.3 Going through the code

2.5.4 Running the app

2.5.5 Making changes to the app

2.5.6 Killing and restarting the server

Summary