Use urlencode from urllib for encoding and parse_qs from urlparse for decoding. urlencode takes a dict while parse_qs takes a string. I learned from this awesome link.
Use urlencode from urllib.parse for encoding and parse_qs from urllib.parse for decoding. urlencode takes a dict while parse_qs takes a string.
Install future package version 0.16.0. Import urlencode and parse_qs from future.moves.urllib.parse.