python urllib quote code example
Example 1: urllib python
#Used to make requests
import urllib.request
x = urllib.request.urlopen('https://www.google.com/')
print(x.read())
Example 2: url encoded path using python
#Python3
import urllib
print (urllib.parse.quote('gitlab/gith', safe=''))
>>> gitlab%Fgith