#NEWLINE# @ app . route ( '/notebooks/test_notebook<int:notebookid>' , methods = [ 'GET' , 'PUT' ] ) #NEWLINE# def notebookjson( notebookid ) : #NEWLINE# #INDENT# if ( request . method == 'PUT' ) : #NEWLINE# #INDENT# app . shutdown ( request . data , app . notebooks [ notebookid ] [ 1 ] ) #NEWLINE# return '' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# ( parsed , filename ) = app . notebooks [ notebookid ] #NEWLINE# parsed [ 'metadata' ] [ 'filename' ] = filename #NEWLINE# return json . dumps ( parsed )