With Class-Based Views, we use classes instead of methods to implement our views. A simple example of using Class-Based Views looks as follows:
from flask import Flask
from flask.views import View
app = Flask(__name__)
class HelloWorld(View):
def dispatch_request(self):
ret...