An unaffiliated python interface for dbt Cloud APIs
Interactive Demo: https://dpguthrie-dbtc-streamlit-home-yy7c0b.streamlit.app/
Source Code: https://github.com/dpguthrie/dbtc
V3 Docs (Unofficial): https://documenter.getpostman.com/view/14183654/UVsSNiXC
dbtc is an unaffiliated python interface to various dbt Cloud API endpoints.
This library acts as a convenient interface to two different APIs that dbt Cloud offers:
- Cloud API: This is a REST API that exposes endpoints that allow users to programatically create, read, update, and delete resources within their dbt Cloud Account.
- Metadata API: This is a GraphQL API that exposes metadata generated from a job run within dbt Cloud.
- Requests - The elegant and simple HTTP library for Python, built for human beings.
- sgqlc - Simple GraphQL Client
- Typer - Library for building CLI applications
The interface to both APIs are located in the
The example below shows how you use the
cloud property on an instance of the
dbtCloudClient class to access methods that allow for programmatic control over dbt Cloud resources.
from dbtc import dbtCloudClient
client = dbtCloudClient()
project = client.cloud.get_project(account_id=1, project_id=1)
All of the methods available via the
dbtCloudClient class are also available through the command line via
The same code above can be written as follows using the CLI:
dbtc get-project --account-id=1 --project-id=1
This project is licensed under the terms of the MIT license.