skillfed

dbt-core-interface

Dbt Core Interface

dbt-core-interface v1.1.7 109.0K downloads/30d#12,532 on PyPI47
Permissive license MIT AGING released

What it is and what it does

dbt-core-interface wraps dbt-core (v1.8+) in a Python API that lets you compile, execute, and manage dbt projects entirely in memory without invoking the dbt CLI. It hydrates dbt's RuntimeConfig, resolves refs and sources, renders Jinja macros, and integrates SQLFluff for linting and formatting—all callable from Python code or exposed via a FastAPI server.

The package supports multiple projects simultaneously through DbtProjectContainer, background file watching for auto-reparsing, and direct dbt command passthrough (run, test, docs serve). It also includes data quality monitoring with check types like RowCountCheck and NullPercentageCheck, plus a generic test library for schema validation. Typical use cases include building custom dbt tooling, embedding dbt workflows in Python applications, and prototyping dbt extensions outside the core repository.

Use it for:

  • Build a FastAPI service that compiles and lints dbt SQL on demand without spawning dbt CLI processes.
  • Programmatically execute dbt models and tests from Python, capturing results for custom reporting or alerting.
  • Manage multiple dbt projects in a single Python process, switching contexts and running checks across them.
  • Integrate dbt compilation and macro rendering into a custom IDE or editor plugin.
  • Implement automated data quality checks and webhook-based alerts on model outputs.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Provides a lightweight Python interface to dbt-core (v1.8+) for in-memory SQL compilation, macro evaluation, and project management without leaving Python.

Yes, if you need to embed dbt workflows into Python applications or build custom dbt tooling. The low install friction, permissive license, and active repository make it a reasonable choice. However, maintenance is aging (215 days since release), so verify that the version supports your dbt-core release and that data quality features meet your stability requirements before relying on them in production.

Install

dbt-core-interface on PyPI

pip

pip install dbt-core-interface

uv

uv add dbt-core-interface

poetry

poetry add dbt-core-interface

Installing dbt-core-interface

Before you install

Low install friction with a pure-Python wheel. Depends on dbt-core, dbt-adapters, rich, typing-extensions, and requests. Maintenance status is aging (215 days since last release), though the repository remains active and unarchived.

License in practice

MIT license is permissive; you can use, modify, and distribute this package with minimal legal restriction, provided you include the license notice.

Quickstart

pip install dbt-core-interface

from dbt_core_interface import DbtProject

project = DbtProject(project_dir="/path/to/dbt_project")
result = project.execute_sql("SELECT current_date AS today")
print(result.table)

Requires Python 3.10+ and dbt-core >= 1.8.0 to be installed and configured with a valid profiles.yml.

Verify before relying

  • Whether the package's data quality monitoring and generic test library features are production-ready or still experimental.
  • Performance characteristics and scalability limits when managing many concurrent projects or large dbt manifests.
  • Compatibility with dbt-core versions beyond 1.8 and any breaking changes in recent dbt releases.

Package facts

License MIT (permissive)
Python support supports the current Python release (<3.14,>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 5 — dbt-core, dbt-adapters, rich, typing-extensions, requests
Maintenance aging — 215 days since the last release
Last repo commit
First released
Downloads 109,028/month — #12,532 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: dbt_core_interface-1.1.7-py3-none-any.whl

Keywords: dbt, sqlfluff

Development Status :: 4 - Beta

Tags

dbt core python interfaceprogrammatic dbt sql compilationdbt project in-memory executiondbt fastapi serverdbt macro evaluation pythonthread-safe dbt runtimedbt multi-project management
dbt-integrationsql-compilationdata-quality

More Build Tools packages