1import requests
2
3x = requests.get('https://w3schools.com')
4print(x.status_code)
1import requests
2
3response = requests.get('<api-endpoint>')
4response.raise_for_status()
5
6data = response.json()
7print(data)
1import requests
2
3r = requests.get('https://api.github.com', auth=('user', 'pass'))
4
5print r.status_code
6print r.headers['content-type']
1# pip install requests
2import requests
3req = requests.get('<url here>', 'html.parser')
4print(req.text)