Registry / analytics / dbt-sl-sdk

dbt-sl-sdk

JSON →
library0.13.4pypypi✓ verified 84d ago

A Python client for dbt's Semantic Layer, enabling programmatic access to dbt Metrics and saved queries. Current version: 0.13.4, release cadence: monthly.

pip install dbt-sl-sdk
INSTALL
IMPORT
SIG · DBT-SL-SDK
D
dbt-sl-sdk
analyticspythonv0.13.4
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

SemanticLayerClient
✓ from dbtsl import SemanticLayerClient
✗ from dbt_sl_sdk import SemanticLayerClient

Initialize client with environment ID and auth token, then query a metric.

import os from dbt_sl_sdk import SemanticLayerClient client = SemanticLayerClient( environment_id=os.environ['DBT_ENVIRONMENT_ID'], auth_token=os.environ['DBT_AUTH_TOKEN'] ) result = client.query( metrics=['order_total'], group_by=['metric_time__day'], where={'metric_time__day': '>= 2024-01-01'} ) print(result.to_pandas().head())
Debug
Known issues
breakingIn version 0.11.0, the `query()` method changed from returning a list of dicts to returning a `QueryResult` object. Code using `result[0]` will break.
fix
Use `result.to_pandas()` or `result.rows` to access data.
affects: >=0.11.0
gotchaThe `where` parameter in `query()` expects a dictionary, not a string. Passing a raw SQL string will raise a `ValueError`.
fix
Always provide a dictionary with field names as keys and string conditions as values.
affects: all
deprecatedThe `auth_token` parameter is deprecated as of 0.12.0. Use a service token instead.
fix
Replace `auth_token` with `service_token` or use environment variable `DBT_SERVICE_TOKEN`.
affects: >=0.12.0
Upgrade
Version history
0.13.4latest on PyPI · released May 27, 2026
Audit
Dependencies
httpxrequiredHTTP client for API requests
pydanticrequiredData validation and settings
dbt-serveroptionalBackend interface for some queries
Agent activity
38 hits · last 30 days
node
32
OpenAI (training)
1
Resources

No resource links recorded.

dbt-sl-sdk — pip install dbt-sl-sdk · libregistry