How to Solve NameError: name 'func' is not defined -- sqlalchemy

Solution: Import the 'func' module

To Solve the error, add the following line to the top of your code.

from sqlalchemy.sql import func

 

For more information:
Python sqlalchemy func