python urlencode component code example
Example 1: python querystring parse
from urllib.parse import urlparse, parse_qs
URL='https://someurl.com/with/query_string?i=main&mode=front&sid=12ab&enc=+Hello'
parsed_url = urlparse(URL)
parse_qs(parsed_url.query)
Example 2: url encoded path using python
#Python3
import urllib
print (urllib.parse.quote('gitlab/gith', safe=''))
>>> gitlab%Fgith