from oauth2client import gce

def GetMetadata(path):
    return urllib.request.urlopen('http://metadata/computeMetadata/v1/%s' % path,
        headers={'Metadata-Flavor': 'Google'}).read()
credentials = gce.AppAssertionCredentials(scope=
    'https://www.googleapis.com/auth/bigquery')
client = bigquery_client.BigqueryClient(credentials=credentials, api=
    'https://www.googleapis.com', api_version='v2', project_id=GetMetadata(
    'project/project-id'))
How to auth into BigQuery on Google Compute Engine?