python url encode string code example
Example 1: python urlencode
import urllib.parse
query = 'Hellö Wörld@Python'
print(urllib.parse.quote(query))
>> 'Hell%C3%B6%20W%C3%B6rld%40Python'
Example 2: url encoded path using python
#Python3
import urllib
print (urllib.parse.quote('gitlab/gith', safe=''))
>>> gitlab%Fgith