Sure. Suppose you are working in CS 304 and you need Flask, PyMySQL, Bcrypt and a few other modules. You need to install them, so you need to use virtualenv, since you are not an admin for the CS server.
Suppose you are also in, say, bioinformatics course and you need to install a bunch of Python modules for that course. You could install them in the same venv, but maybe they don't play well together. So, you decide to install them in a different venv.
A venv is just like a folder of Python modules. It's just set up so that Python knows to import modules from that folder.
Flaskk doesn't require venv; Flask doesn't care where you get your modules from.
Venv just allows you to install a module of your own.
Yes, we'll use venv
Glad to. Different services listen for packets on different ports, just like different offices in Green Hall.
A port is just a numbered door on the server.
Apache listens on 80 and 443, SSH on 22, mail on 25, and our development versions of flask will run on our own UID.
Yes, pretty much. When a request comes in, the Flask intrastructure parses the URL and passes the request off to one of our handlers, to, well, handle it. That's the routing.
It establishes a correspondence between a function we write and an endpoint. You essentially are telling the Flask infrastructure: when a request comes in with a URL that ends like this, call that function.
The Flask infrstructure calls it! The great thing about using Flask is that you don't have to deal with the low-level network stuff, but the consequence is that you have to hook into its way of calling your code.
It's possible to assign a function to multiple endpoints, but we won't do that often, if at all. Let's start simple.
I'm not sure what you mean by urls that have different names.
Sure. We will always be in development mode. So, it might not feel like you are creating a "real" web application. But you are: all but the last step, which is to deploy it. And you can do that if you want.
You don't switch. That involves interacting with the sysadmin (me). We'll discuss later in the course.
Localhost is a universal hostname meaning "the host that I am on". Like the pronoun "me".
Not really. They both involve SSH, but the tunnel is some extra machinery to transfer network packets between the remote machine and your localhost (your laptop).
Alas, the word "engine" is overworked. Innodb is a different data structure for table representation. Jinja2 is a language for combining data with HTML.
For sure! Let's get to it!