SyntaxFix
Write A Post
Hire A Developer
Questions
You’re looking for urllib.parse.urlencode
urllib.parse.urlencode
import urllib.parse params = {'username': 'administrator', 'password': 'xyz'} encoded = urllib.parse.urlencode(params) # Returns: 'username=administrator&password=xyz'