Setting up a RESTful application
First, create the project’s virtual environment, which will serve as the local repository of the needed module extensions. Next, open the VSCode editor to make the main project folder and install the flask
extension module using the pip
command through the VSCode’s command line interpreter.
Afterward, manage the directory structure, such as the arrangement made for Chapter 2 projects. From the three approaches, namely the application factory design, Blueprint
, and the hybrid between these two, our online pizza ordering application will use the application factory approach to place its custom exception classes, models, repository, services, utilities, APIs, and database configuration in one app
folder and register all these components using the create_app()
method. Figure 3.1 shows the project directory structure of our prototype application.
Figure 3.1 – Project directory structure for the RESTful application...