Here’s precisely what the preceding laws does:
Outlines 1 – 9 significance some Flask modules generate others API replies, plus importing the db case through the config.py module. In addition, they imports the SQLAlchemy Person and Marshmallow PersonSchema classes to get into the individual database desk and serialize the outcome.
Range 11 starts the definition of read_all() that reacts towards the REMAINDER API Address endpoint Purchase /api/people and returns all files inside individual databases table arranged in rising order by final label.
Lines 19 – 22 inform SQLAlchemy to question anyone databases table for all the files, type all of them in ascending purchase (the default sorting purchase), and return a list of Person Python objects as the changeable visitors .Continue reading