Your First REST API

Getting set up

Create a virtual environment and activate it.

python3.10 -m venv .venv
source .venv/bin/activate

Install Flask.

pip install flask

Create a file for the Flask app (I like to call it Create the Flask app.
from flask import Flask

app = Flask(__name__)

Now you can run this app using the Flask Command-Line Interface (CLI):

flask run

But the app doesn't do anything yet! Let's work on our first API endpoint next.