Python3 requests with authentication
def get_data(auth_user, auth_passwd, url):
headers = {'Accept': 'application/json'}
response = requests.get(
url, auth=requests.auth.HTTPBasicAuth(
auth_user, auth_passwd), headers=headers)
return json.loads(response.text)