@process_request_body
def yaml_processor(entity):
 body = entity.fp.read()
 try:
  cherrypy.serving.request.unserialized_data = yaml.safe_load(body)
 except ValueError:
  raise cherrypy.HTTPError(400, 'Invalid YAML document')
 cherrypy.serving.request.raw_body = body

@ process_request_body def yaml_processor ( entity ) : body = entity . fp . read ( ) try : cherrypy . serving . request . unserialized_data = yaml . safe_load ( body ) except ValueError : raise cherrypy . HTTPError ( 400 , 'Invalid YAML document' ) cherrypy . serving . request . raw_body = body
unserialize raw post data in yaml format to a python data structure .