Now we will create the model that we will use to represent and persist a user. Open the models.py file within the service folder and add the following lines after the declaration of the ResourceAddUpdateDelete class. Make sure that you add the highlighted import statements. The code file for the sample is included in the restful_python_2_03_02 folder, in the Flask01/service/models.py file:
from passlib.apps import custom_app_context as password_context
import re class User(orm.Model, ResourceAddUpdateDelete): id = orm.Column(orm.Integer, primary_key=True) name = orm.Column(orm.String(50), unique=True, nullable=False) # I save the hash for the password (I don't persist the actual password) password_hash = orm.Column(orm.String(120), nullable=False) creation_date = orm.Column(orm.TIMESTAMP, server_default=orm.func.current_timestamp...