for k, v in query:
    k = urllib.parse.quote(str(k), safe=' /+')
v = urllib.parse.quote(str(v), safe=' /+')
l.append(k + '=' + v)
return '&'.join(l)
Passing the '+' character in a POST request in Python