def _delete_fields(srv, data):
 if (srv[0] in DELETE_FIELDS):
  for i in DELETE_FIELDS[srv[0]]:
   if (i in data):
    del data[i]
 return data

def _delete_fields ( srv , data ) : if ( srv [ 0 ] in DELETE_FIELDS ) : for i in DELETE_FIELDS [ srv [ 0 ] ] : if ( i in data ) : del data [ i ] return data
delete not needed fields in post request .