dbt-core-interface
Dbt Core Interface
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-interfaceuv
uv add dbt-core-interfacepoetry
poetry add dbt-core-interfaceInstalling 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
Tags
More Build Tools packages
Provides reusable utilities for Python…
permissive · top 100 on PyPI
tqdmWraps any iterable to display a real-time…
copyleft · top 100 on PyPI
pippip is the standard installer for Python…
permissive · top 100 on PyPI
hatchlingHatchling is a standards-compliant Python build…
permissive · top 100 on PyPI
grpcio-toolsGenerates Python gRPC service stubs and message…
permissive · top 1,000 on PyPI
pre-commitpre-commit is a framework for installing and…
permissive · top 1,000 on PyPI
dbt-coredbt-core transforms raw data in a warehouse…
permissive · top 1,000 on PyPI
sqlfluff-templater-dbtEnables SQLFluff to lint and auto-fix dbt…
permissive · top 5,000 on PyPI
dbt-core-experimental-parserExperimental parser for dbt Core v2.0 (alpha),…
permissive · top 5,000 on PyPI
dbt-adaptersProvides base adapter protocols and shared…
permissive · top 1,000 on PyPI
dbt-loomdbt-loom is a dbt Core plugin that fetches…
unclear · top 15,000 on PyPI
dbt-sqlserverA dbt adapter that enables data transformation…
permissive · top 15,000 on PyPI
dbt-osmosisdbt-osmosis is a CLI tool and Python package…
permissive · top 15,000 on PyPI
dbt-semantic-interfacesProvides shared semantic class definitions,…
permissive · top 1,000 on PyPI
dbt-metricflowBundles dbt-core and MetricFlow with compatible…
permissive · top 15,000 on PyPI
dbt-commonProvides shared utilities and common code used…
permissive · top 1,000 on PyPI