Skip to content

PRO TIP Block youtube.com at the DNS level β€” Pi-hole, NextDNS or your hosts file β€” but allow youtube-nocookie.com and i.ytimg.com. These tutorials keep playing; the rabbit hole does not.

Learning without distractions

Python Backend #1: Flask Web Server Setup (Beginner Python Tutorial)

5.4K views on YouTube

Python Web Backend Series (Part 1/6)
Turn Python into a working web server using Flask β€” a lightweight and beginner-friendly framework. In this quick-start tutorial, we’ll walk through setting up Flask in VS Code, running your server, and returning your first JSON response.

πŸ”§ Tools You’ll Need:
Python: https://www.python.org/downloads/
VS Code: https://code.visualstudio.com/
Flask: Install with pip install flask
pip3 install flask

πŸ“š What You’ll Learn:
βœ… Creating your first local web server
βœ… What __name__ == “__main__” means
βœ… Running your server in VS Code
βœ… Understanding the localhost:5000 address

πŸ”₯ Download My Project Files
πŸ‘‰ Get the source code here:
πŸ”— https://ndcswift.github.io/Swift-Projects/

⏱️ Timestamps:
00:00 – Intro to the series
00:35 – Tools we’re using today
01:08 – Project setup
01:21 – Installing Flask
02:06 – Imports
02:20 – establishing our app
02:40 – Routing our app with a URL path
02:58 – Creating our home function / message
03:49 – Only run this app if we’re running this file directly
04:32 – Running our local server
05:04 – Seeing our server (local host)on a web browser
05:26 – What we’ve built & wrap up