def new_db_session():
 return create_session(application.database_engine, autoflush=True, autocommit=False)

def new_db_session ( ) : return create_session ( application . database_engine , autoflush = True , autocommit = False )
this function creates a new session if there is no session yet for the current context .