Skip to content
This repository has been archived by the owner on Jun 23, 2022. It is now read-only.

huq-industries/dbt-cloud-python

Repository files navigation

dbt-cloud-python

Python client for dbt cloud

No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)

This Python package is automatically generated by the Swagger Codegen project:

  • API version: 2.0.0a1
  • Package version: 1.0.0
  • Build package: io.swagger.codegen.v3.generators.python.PythonClientCodegen

Requirements.

Python 2.7 and 3.4+

Installation & Usage

pip install

If the python package is hosted on Github, you can install directly from Github

pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git)

Then import the package:

import dbt_cloud_client 

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import dbt_cloud_client

Getting Started

Please follow the installation procedure and then run the following:

from __future__ import print_function
import time
import dbt_cloud_client
from dbt_cloud_client.rest import ApiException
from pprint import pprint


# create an instance of the API class
api_instance = dbt_cloud_client.AccountsApi(dbt_cloud_client.ApiClient(configuration))
account_id = 56 # int | Numeric ID of the account to retrieve

try:
    # get account by id
    api_response = api_instance.get_account_by_id(account_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccountsApi->get_account_by_id: %s\n" % e)


# create an instance of the API class
api_instance = dbt_cloud_client.AccountsApi(dbt_cloud_client.ApiClient(configuration))

try:
    # search or list accounts
    api_response = api_instance.list_accounts()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccountsApi->list_accounts: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to https://cloud.getdbt.com/api/v2

Class Method HTTP request Description
AccountsApi get_account_by_id GET /accounts/{accountId}/ get account by id
AccountsApi list_accounts GET /accounts/ search or list accounts
ConnectionsApi create_connection POST /accounts/{accountId}/connections/ create connection on account
ConnectionsApi delete_connection_by_id DELETE /accounts/{accountId}/connections/{connectionId}/ delete connection on account
ConnectionsApi get_connection_by_id GET /accounts/{accountId}/connections/{connectionId}/ get specific connection on account
ConnectionsApi list_connections_for_account GET /accounts/{accountId}/connections/ search or list connections on an account
ConnectionsApi update_connection_by_id POST /accounts/{accountId}/connections/{connectionId}/ update connection on account
CredentialsApi create_credentials POST /accounts/{accountId}/credentials/ create credentials on account
CredentialsApi list_credentials_for_account GET /accounts/{accountId}/credentials/ search or list credentials on an account
EnvironmentsApi create_environment POST /accounts/{accountId}/environments/ create environment on account
EnvironmentsApi delete_environment_by_id DELETE /accounts/{accountId}/environments/{environmentId}/ delete environment on account
EnvironmentsApi get_environment_by_id GET /accounts/{accountId}/environments/{environmentId}/ get specific environment on account
EnvironmentsApi list_environments_for_account GET /accounts/{accountId}/environments/ search or list environments on an account
EnvironmentsApi update_environment_by_id POST /accounts/{accountId}/environments/{environmentId}/ update environment on account
JobsApi create_job POST /accounts/{accountId}/jobs/ create job on account
JobsApi delete_job_by_id DELETE /accounts/{accountId}/jobs/{jobId}/ delete job on account
JobsApi get_job_by_id GET /accounts/{accountId}/jobs/{jobId}/ get specific job on account
JobsApi list_jobs_for_account GET /accounts/{accountId}/jobs/ search or list jobs on an account
JobsApi trigger_run POST /accounts/{accountId}/jobs/{jobId}/run/ trigger run for job
JobsApi update_job_by_id POST /accounts/{accountId}/jobs/{jobId}/ update job on account
RepositoriesApi create_repository POST /accounts/{accountId}/repositories/ create repository on account
RepositoriesApi get_repository_by_id GET /accounts/{accountId}/repositories/{repositoryId}/ get specific repository on account
RepositoriesApi list_repositories_for_account GET /accounts/{accountId}/repositories/ search or list repositories on an account
RunsApi cancel_run_by_id POST /accounts/{accountId}/runs/{runId}/cancel/ cancel specific run on account
RunsApi get_run_by_id GET /accounts/{accountId}/runs/{runId}/ get specific run on account
RunsApi list_runs_for_account GET /accounts/{accountId}/runs/ search or list runs for an account

Documentation For Models

Documentation For Authorization

bearerAuth

Author

support@getdbt.com

About

Python client for dbt cloud

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published