Skip to content

Commit 9d98c4f

Browse files
authored
Python Library (#8521)
2 parents 826b0f1 + 496adbd commit 9d98c4f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

website/docs/reference/programmatic-invocations.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ title: "Programmatic invocations"
44

55
In v1.5, <Constant name="core" /> added support for programmatic invocations. The intent is to expose the existing <Constant name="core" /> CLI via a Python entry point, such that top-level commands are callable from within a Python script or application.
66

7-
The entry point is a `dbtRunner` class, which allows you to `invoke` the same commands as on the CLI.
7+
Refer to the [<Constant name="core" /> package on PyPI](https://pypi.org/project/dbt-core/) to install the official Python package for <Constant name="core" /> if you haven’t done so already.
8+
9+
The entry point is the `dbtRunner` class, which allows you to `invoke` the same commands available in the <Constant name="cloud" /> CLI.
810

911
```python
1012
from dbt.cli.main import dbtRunner, dbtRunnerResult
@@ -23,6 +25,8 @@ for r in res.result:
2325
print(f"{r.node.name}: {r.status}")
2426
```
2527

28+
For implementation details, see the source definitions of `dbtRunner` and `dbtRunnerResult` in the [<Constant name="core" /> repository](https://github.com/dbt-labs/dbt-core/blob/main/core/dbt/cli/main.py).
29+
2630
## Parallel execution not supported
2731

2832
[`dbt-core`](https://pypi.org/project/dbt-core/) doesn't support [safe parallel execution](/reference/dbt-commands#parallel-execution) for multiple invocations in the same process. This means it's not safe to run multiple dbt commands concurrently. It's officially discouraged and requires a wrapping process to handle sub-processes. This is because:

0 commit comments

Comments
 (0)