def item_endpoint(**lookup):
 resource = _resource()
 response = None
 method = request.method
 if (method in ('GET', 'HEAD')):
  response = getitem(resource, **lookup)
 elif (method == 'PATCH'):
  response = patch(resource, **lookup)
 elif (method == 'PUT'):
  response = put(resource, **lookup)
 elif (method == 'DELETE'):
  response = deleteitem(resource, **lookup)
 elif (method == 'OPTIONS'):
  send_response(resource, response)
 else:
  abort(405)
 return send_response(resource, response)

def item_endpoint ( ** lookup ) : resource = _resource ( ) response = None method = request . method if ( method in ( 'GET' , 'HEAD' ) ) : response = getitem ( resource , ** lookup ) elif ( method == 'PATCH' ) : response = patch ( resource , ** lookup ) elif ( method == 'PUT' ) : response = put ( resource , ** lookup ) elif ( method == 'DELETE' ) : response = deleteitem ( resource , ** lookup ) elif ( method == 'OPTIONS' ) : send_response ( resource , response ) else : abort ( 405 ) return send_response ( resource , response )
item endpoint handler .