--- id: dbt-sl-sdk version: "0.13.4" license: unclear license_treatment: unclear maintenance: active --- # dbt-sl-sdk — A client for dbt's Semantic Layer License: unclear · Maintenance: active · Downloads: 116.3K/mo ## 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 above — 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 pip install dbt-sl-sdk uv add dbt-sl-sdk poetry add dbt-sl-sdk ## Installing 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="", 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_current - Install friction: low - Maintenance: active - Downloads: 116.3K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags dbt semantic layer python client, query dbt metrics programmatically, dbt cloud api python sdk, semantic layer rest api client, dbt metric query library, dbt-integration, semantic-layer [View on SkillFed](https://skillfed.io/packages/dbt-sl-sdk) · [View on PyPI](https://pypi.org/project/dbt-sl-sdk/)