def sign(key, qs):
    """Signs the query string using the key."""
    sig = derive_signature(key, qs)
    return "%s&%s" % (qs, urlencode([("sig", sig)]))
def sign ( key , qs ) : sig = derive_signature ( key , qs ) return "%s&%s" % ( qs , urlencode ( [ ( "sig" , sig ) ] ) )
Signs the query string using the key.