I'm trying to feed the following URL structure into requests:
https://inventory.data.gov/api/action/datastore_search?resource_id=8ea44bc4-22ba-4386-b84c-1494ab28964b&filters={"City":"Las Vegas","State":"NV"}
I wanted to break up the URL into params, but am having a terrible time getting the filters portion to work properly. I ended up using the below code:
url = 'https://inventory.data.gov/api/action/datastore_search?' \
'resource_id=8ea44bc4-22ba-4386-b84c-1494ab28964b&' \
'filters={"City":"' + city + '","State":"' + state + '"}'
resp = requests.get(url=url)
print resp.url
Does anybody know how I can modify this to work with requests like requests.get(url=url, params=params)
?