In these sections, you'll learn
- How webservers work, and how to set up a Flask webserver
- How to use "templates" (custom HTML and CSS) with Flask
- How to take user input into your Python programs through Flask
Before starting these sections, you should have an understanding of
- Have Python and Flask installed (see "Before We Start" below)
- Python Basics
- HTML/CSS (for parts 2 and 3)
In these sections, we'll discuss hosting web content with Flask servers, how to use custom HTML/CSS with them, and how to take input into your own Python code from users and send output back to them.
Make sure that you have Python 3 and Flask installed! Since we'll be running webservers for this section, we can't do this workshop on Google Colab (since Google doesn't wanna give free hosting to anyone).
The latest version of Python 3 for your OS can be found at https://www.python.org/downloads/. If using Linux of some variety, try to install it through your package manager (e.g. apt-get, pacman, etc.) instead of downloading from the website.
Once Python is installed, open the command prompt and run pip3 install Flask
.
You should be good to go!
1. Intro to Webservers and Flask