I am new to python, i want to know in python how to receive the URL parameter value? I tried with below code, but
import urllib.parse as urlparse
from urllib.parse import urlencode
url = "http://domainanme.com/api/filename.py?para_name=value"
url_parts = list(urlparse.urlparse(url))
query = dict(urlparse.parse_qsl(url_parts[4]))
Using python i am unable to receive para_name = value
But in PHP can easily get URL parameter value using $_GET['para_name']
, with out knowing the full URL, but in python how do i know the full URL with params
Note: i want to do using core python without any Python framework