Skip to main content

Dbt Core Interface

Project description

Dbt Core Interface

PyPI Status Python Version License

Read the documentation at https://dbt-core-interface.readthedocs.io/ Tests Codecov

pre-commit Black

Features

An extremely simplified interface is provided to accomplish all of the following with no dependencies outside dbt-core:

  • Parse dbt project on disk loading dbt core classes into memory from a single class/interface

  • Automatic management of the adapter and thread-safe efficient connection pool reuse

  • Run SQL and get results in python fully independent of the dbt adapter which automatically enables support for many databases

  • Run SQL with dbt SQL from a single method call

  • Load macros at runtime enabling custom functionality in third party extensions without requiring the dbt packaging system to be managed in userland

  • Compile dbt jinja extremely fast and efficiently, thread-safe and stress tested at load via a fastapi server which live compiles SQL

  • Manage multiple dbt projects in a single process using the DbtProjectContainer class

dbt-core-interface is a wrapper that allows developers to rapidly develop features and integrations for dbt. This project aims to serve as a place for the community to aggregate the best ways to interface with dbt. It is afforded a much faster iteration cycle and much more freedom due to it's independence from the dbt codebase. It is intended to act as an common library to dbt's existing APIs for developers. Implementations can land here and prove themselves out before landing in the dbt-core codebase and benefit all developers involved. Sqlfluff dbt templater, dbt-osmosis, dbt-fastapi which I am ripping out of dbt-osmosis, an impending metadata manager, a testing framework will all leverage this library. As dbt core evolves and stabilizes its python API, this project will evolve with it. This may manifest in simplification of certain methods but our goal is to maintain the API and focus on driving efficient, innovative/creative, and agile community driven integration patterns.

Requirements

  • The only requirement is dbt-core, tested with versions 1.0.*, 1.1.*, 1.2.*, 1.3.*

Installation

You can install Dbt Core Interface via pip from PyPI:

$ pip install dbt-core-interface

Usage

Please see the Api Reference for details.

Contributing

Contributions are very welcome. To learn more, see the Contributor Guide.

License

Distributed under the terms of the MIT license, Dbt Core Interface is free and open source software.

Issues

If you encounter any problems, please file an issue along with a detailed description.

Credits

This project was generated from @cjolowicz's Hypermodern Python Cookiecutter template.

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

dbt_core_interface-0.2.0.tar.gz (16.6 kB view details)

Uploaded Source

Built Distribution

dbt_core_interface-0.2.0-py3-none-any.whl (15.1 kB view details)

Uploaded Python 3

File details

Details for the file dbt_core_interface-0.2.0.tar.gz.

File metadata

  • Download URL: dbt_core_interface-0.2.0.tar.gz
  • Upload date:
  • Size: 16.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.9.10 Darwin/21.3.0

File hashes

Hashes for dbt_core_interface-0.2.0.tar.gz
Algorithm Hash digest
SHA256 5ea88364e86d87d3ef04659a21ac6e24c0a82bfd9191ddcb4480d88c7a52a568
MD5 1f6ffa4e18da01d506d10bd1307daa08
BLAKE2b-256 2e1a3eb39a269378613dafe44c74f5f923d925cce631519ce7877ba52ff75afc

See more details on using hashes here.

File details

Details for the file dbt_core_interface-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for dbt_core_interface-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cf192dbaed3564908740f0a100f8df0a723e53c06a5908f6fe408c477c6c88f9
MD5 70f2da46b7cc616bce54ddf122be7566
BLAKE2b-256 e94af8102fd9837203b4ac1c3d7ccb66f3779dba6e16b0bbca413f3d550d59c4

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