import requests
import pprint


api_token = '<KEY>'
api_url_base = 'https://api.github.com/user'

headers = {'Content-Type': 'application/json',
           'Authorization': 'Bearer {0}'.format(api_token)}


def get_account_info():
    response = requests.get(api_url_base, headers=headers)
    user=response.json()
    pprint.pprint(user)


get_account_info()
import requests
import pprint


api_token = '<KEY>'
api_url_base = 'https://api.github.com/user'

headers = {'Content-Type': 'application/json',
           'Authorization': 'Bearer {0}'.format(api_token)}


def get_account_info():
    response = requests.get(api_url_base, headers=headers)
    user=response.json()
    pprint.pprint(user)


get_account_info()