#NEWLINE# def list_models( self ) : #NEWLINE# #INDENT# with session_scope ( self . session ) as session : #NEWLINE# #INDENT# results = session . query ( self . DBModel . metadata_ ) . all ( ) #NEWLINE# #UNINDENT# infos = [ json . loads ( res [ 0 ] ) for res in results ] #NEWLINE# return sorted ( infos , key = ( lambda x : x [ 'version' ] ) )