pydbtcloud is a developer kit for interfacing with the dbt Cloud v2 API on Python 3.7 and above.
pip install pydbtcloud
from pydbtcloud import DbtCloud
dbtcloud = DbtCloud(account_id='account_id', api_token='api_token')
Get information about a specific dbt cloud job:
response = dbtcloud.get_job(1234)
You can iterate through pages using the following syntax:
for page in dbtcloud.list_runs():
for run in page.get('data'):
print(run.get('id'))