def get_debug_queries():
 return g.get('sqlalchemy_queries', ())

def get_debug_queries ( ) : return g . get ( 'sqlalchemy_queries' , ( ) )
in debug mode flask-sqlalchemy will log all the sql queries sent to the database .