def parse_unique_urlencoded(content):
 urlencoded_params = urllib.parse.parse_qs(content)
 params = {}
 for (key, value) in six.iteritems(urlencoded_params):
  if (len(value) != 1):
   msg = ('URL-encoded content contains a repeated value:%s -> %s' % (key, ', '.join(value)))
   raise ValueError(msg)
  params[key] = value[0]
 return params

def parse_unique_urlencoded ( content ) : urlencoded_params = urllib . parse . parse_qs ( content ) params = { } for ( key , value ) in six . iteritems ( urlencoded_params ) : if ( len ( value ) != 1 ) : msg = ( 'URL-encoded content contains a repeated value:%s -> %s' % ( key , ', ' . join ( value ) ) ) raise ValueError ( msg ) params [ key ] = value [ 0 ] return params
parses unique key-value parameters from urlencoded content .