#NEWLINE# @ app . route ( '/forward' , methods = [ 'POST' ] ) #NEWLINE# def forward( ) : #NEWLINE# #INDENT# 'Return a JSON of a given number of hourly events' #NEWLINE# if ( request . method == 'POST' ) : #NEWLINE# #INDENT# data = json . loads ( request . form [ 'data' ] ) #NEWLINE# periods = json . loads ( request . form [ 'periods' ] ) #NEWLINE# df = tr . to_df ( data ) #NEWLINE# json_return = tr . forward ( df = df , periods = periods ) #NEWLINE# resp = Response ( json . dumps ( json_return ) , status = 200 , mimetype = 'application/json' ) #NEWLINE# return resp