urllib.parse.urlencode({"q": "encode uri", "lang": "python"})
Output: "q=encode+uri&lang=python"
"q=encode+uri&lang=python"
import urllib.parse