1>>> r = requests.get('https://api.github.com/user', auth=('user', 'pass'))
2>>> r.status_code
3200
4>>> r.headers['content-type']
5'application/json; charset=utf8'
6>>> r.encoding
7'utf-8'
8>>> r.text
9u'{"type":"User"...'
10>>> r.json()
11{u'private_gists': 419, u'total_private_repos': 77, ...}
12