#NEWLINE# @ app . route ( '/categories/' , methods = [ 'GET' ] ) #NEWLINE# def cat_list( ) : #NEWLINE# #INDENT# ret = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# for cat in category . Category . get_all_categories ( REDIS ) : #NEWLINE# #INDENT# ret [ cat . cat_id ] = cat . to_dict ( ) #NEWLINE# #UNINDENT# return flask . jsonify ( ret )