def get_state(app):
 assert ('sqlalchemy' in app.extensions), 'The sqlalchemy extension was not registered to the current application.  Please make sure to call init_app() first.'
 return app.extensions['sqlalchemy']

def get_state ( app ) : assert ( 'sqlalchemy' in app . extensions ) , 'The sqlalchemy extension was not registered to the current application.  Please make sure to call init_app() first.' return app . extensions [ 'sqlalchemy' ]
gets the state for the application .