Skip to main content

An unaffiliated python wrapper for dbt Cloud APIs

Project description

An unaffiliated python interface for dbt Cloud APIs

Coverage Package version Downloads


Documentation: https://dbtc.dpguthrie.com

Source Code: https://github.com/dpguthrie/dbtc

V2 Docs: https://docs.getdbt.com/dbt-cloud/api-v2

V3 Docs (Unofficial): https://documenter.getpostman.com/view/14183654/UVsSNiXC

V4 Docs: https://docs.getdbt.com/dbt-cloud/api-v4


Overview

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.

Requirements

Python 3.7+

  • Requests - The elegant and simple HTTP library for Python, built for human beings.
  • sgqlc - Simple GraphQL Client
  • Typer - Library for building CLI applications

Installation

pip install dbtc

Basic Usage

Python

The interface to both APIs are located in the dbtCloudClient class.

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()

account = client.cloud.get_account_by_name('My Account')
project = client.cloud.get_project_by_name(account['id'], 'My Project')

run_id = client.cloud.trigger_job_and_poll()

License

This project is licensed under the terms of the MIT license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dbtc-0.1.3.tar.gz (23.9 kB view details)

Uploaded Source

Built Distribution

dbtc-0.1.3-py3-none-any.whl (24.8 kB view details)

Uploaded Python 3

File details

Details for the file dbtc-0.1.3.tar.gz.

File metadata

  • Download URL: dbtc-0.1.3.tar.gz
  • Upload date:
  • Size: 23.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.14 CPython/3.10.5 Linux/5.13.0-1031-azure

File hashes

Hashes for dbtc-0.1.3.tar.gz
Algorithm Hash digest
SHA256 e23e372199b2fd9d024a37b0f9917e067b2cd5b3788e3c5d852a0d109b4ac440
MD5 1999abfdab23315cba24d815588880e3
BLAKE2b-256 752549762b13972b39dfa7122afc2d1d8ebe8c29fa70678a1bb6dad5f6d9fa8c

See more details on using hashes here.

File details

Details for the file dbtc-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: dbtc-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 24.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.14 CPython/3.10.5 Linux/5.13.0-1031-azure

File hashes

Hashes for dbtc-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 0b3d7ca0ae6a8f7fe2c628704a39f6a663a4417d53aa30ca36e003483fdf2970
MD5 13bf70d3a3a28879b827bd1e454e8125
BLAKE2b-256 ad9f1bde5e470270adf8fdda7e393f217aea5dc37c7771cb23a9cda208fd8705

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page