#NEWLINE# @ nif_blueprint . route ( '/' , methods = [ 'POST' , 'GET' ] ) #NEWLINE# def home( ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# params = get_params ( request ) #NEWLINE# algo = params . get ( 'algorithm' , None ) #NEWLINE# specific_params = current_app . senpy . parameters ( algo ) #NEWLINE# logger . debug ( 'Specific params: %s' , json . dumps ( specific_params , indent = 4 ) ) #NEWLINE# params . update ( get_params ( request , specific_params ) ) #NEWLINE# response = current_app . senpy . analyse ( ** params ) #NEWLINE# in_headers = ( params [ 'inHeaders' ] != '0' ) #NEWLINE# return response . flask ( in_headers = in_headers ) #NEWLINE# #UNINDENT# except ValueError as ex : #NEWLINE# #INDENT# return ex . message . flask ( )