(url)
return flat_qs
Parses a querystring and flattens 1-arg arrays.
Parses a querystring and flattens 1-arg arrays.
Parses a querystring and flattens 1 - arg arrays .
def parse_and_flatten_qs(url):
    """
    Parses a querystring and flattens 1-arg arrays.
    """
    qs = parse_qs(url)
    flat_qs = {}
    for key in qs:
        flat_qs[key] = qs[key][0] if len(qs[key]) == 1 else qs[key]
    return flat_qs
def parse_and_flatten_qs ( url ) : qs = parse_qs ( url ) flat_qs = { } for key in qs : flat_qs [ key ] = qs [ key ] [ 0 ] if len ( qs [ key ] ) == 1 else qs [ key ] return flat_qs