If you're accessing BigQuery in python, you can do that using the gcloud library.
First, install the gcloud library:
$ pip install --upgrade gcloud
Then, after setting up your auth and project info, you can make api calls in python like this (adapted from the gcloud-python docs):
from gcloud import bigquery
client = bigquery.Client()
datasets, next_page_token = client.list_datasets()
print([dataset.name for dataset in datasets])
(As someone mentioned previously, you can also do it using the google-api-python-client.)
License: Apache 2