How to urlencode a query string in Python?
Simply make a word reference with your boundaries to be encoded in the urlencode function of urrlib module. e.g:
For python 2:
import urllib
d = {'a': 'b', 'c': 'd'};
urllib.urlencode(d)
For Python 3
import urllib
d = {'a': 'b', 'c': 'd'};
urllib.parse.urlencode(d)