dbt-sl-sdk
A client for dbt's Semantic Layer
What it is and what it does
dbt-sl-sdk is a Python client for dbt's Semantic Layer, a centralized metrics platform accessible through a REST API. The package wraps that API in a straightforward Python interface, handling connection pooling via session context managers and supporting both synchronous and asynchronous workflows. All query results come back as pyarrow tables, which you can then convert to other formats if needed.
The library is designed for developers who want to pull metric data into Python applications without writing raw HTTP calls. It includes features like lazy loading to avoid fetching nested object lists for large projects, optional telemetry that can be disabled, and a consistent API between sync and async variants. The package requires Python 3.9 or later and depends on pyarrow, mashumaro, adbc-driver-flightsql, adbc-driver-manager, and typing-extensions.
Use it for:
- Query dbt metrics and dimensions programmatically from a Python application without manual API calls.
- Build data pipelines that fetch metric data and convert pyarrow results to other formats.
- Integrate dbt Semantic Layer queries into async applications using async variants for non-blocking I/O.
- Explore metric definitions and their nested dimensions via lazy-loading mode for large projects.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A Python client library for querying dbt's Semantic Layer via REST APIs, supporting both synchronous and asynchronous workflows with results returned as PyArrow tables.
Yes. The package is actively maintained, has low install friction, carries no known vulnerabilities, and fills a clear need for Python developers working with dbt's Semantic Layer. The sync/async flexibility and pyarrow integration are well-suited to modern data workflows. The only caveat is that license treatment is unclear, so verify licensing implications for your use case before committing to production.
Install
dbt-sl-sdk on PyPI
pip
pip install dbt-sl-sdkuv
uv add dbt-sl-sdkpoetry
poetry add dbt-sl-sdkInstalling dbt-sl-sdk
Before you install
Low install friction with a pure-wheel distribution and five runtime dependencies. Actively maintained with a recent release within the last 79 days.
Quickstart
pip install "dbt-sl-sdk[sync]"
from dbt_sl_sdk import SemanticLayerClient
client = SemanticLayerClient(
environment_id=123,
auth_token="<your-token>",
host="semantic-layer.cloud.getdbt.com",
)
with client.session():
metrics = client.metrics()
table = client.query(metrics=[metrics[0].name], group_by=["metric_time"])
print(table)
Requires Python 3.9 or later. You must provide valid dbt Semantic Layer credentials (environment_id, auth_token, host).
Verify before relying
- Whether the package's telemetry collection (platform information sent to dbt Labs by default) poses privacy concerns for your use case.
- Performance characteristics when working with large metric definitions under lazy loading mode.
- Specific license terms and any restrictions on commercial or proprietary use.
Package facts
| License | not declared (unclear) |
| Python support | supports the current Python release (<3.14,>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 5 — adbc-driver-flightsql, adbc-driver-manager, mashumaro, pyarrow, typing-extensions |
| Maintenance | actively maintained — 79 days since the last release |
| First released | |
| Downloads | 116,274/month — #12,213 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: dbt_sl_sdk-0.13.4-py3-none-any.whl
Tags
More Front-Ends packages
SQLAlchemy is a Python SQL toolkit and Object…
permissive · top 100 on PyPI
psycopg2-binarypsycopg2-binary is a PostgreSQL database…
copyleft · top 1,000 on PyPI
alembicAlembic generates and manages database schema…
permissive · top 1,000 on PyPI
weaviate-clientA Python client library for connecting to and…
permissive · top 1,000 on PyPI
databricks-sql-connectorA Python client library that connects to…
permissive · top 1,000 on PyPI
psycopgPsycopg 3 is a PostgreSQL database adapter for…
copyleft · top 1,000 on PyPI
cube_dbtIntegrates dbt models with Cube's semantic…
permissive · top 15,000 on PyPI
dbt-metricflowBundles dbt-core and MetricFlow with compatible…
permissive · top 15,000 on PyPI
dbt-semantic-interfacesProvides shared semantic class definitions,…
permissive · top 1,000 on PyPI
dbt-mcpExposes dbt project metadata and operations…
permissive · top 15,000 on PyPI
metricflowMetricFlow compiles metric definitions into…
permissive · top 5,000 on PyPI
dbt-fabricsparkA dbt adapter that connects dbt to Apache Spark…
permissive · top 5,000 on PyPI
dbt-snowflakedbt-snowflake is the Snowflake adapter for dbt,…
permissive · top 5,000 on PyPI
dbtA command-line interface for running dbt…
unclear · top 15,000 on PyPI
dbt-coredbt-core transforms raw data in a warehouse…
permissive · top 1,000 on PyPI
dbt-metabaseSyncs dbt project metadata (table…
permissive · top 15,000 on PyPI