Official SDK for Lightdash
Project description
Lightdash Python Client
A Python client for interacting with the Lightdash API.
Installation
pip install lightdash
Usage
See the SDK Guide for full documentation on the query builder, filters, and other features.
For an interactive tutorial, check out the example notebook.
from lightdash import Client
client = Client(
instance_url="https://your-instance.lightdash.com",
access_token="your-access-token",
project_uuid="your-project-uuid"
)
access_token accepts both personal access tokens (ldpat_…) and service
account tokens (ldsvc_…); the SDK selects the correct authentication scheme
automatically.
Development
Prerequisites
Setting up the development environment
- Clone the repository:
git clone https://github.com/lightdash/python-sdk.git
cd python-sdk
- Create and activate a virtual environment:
uv venv
- Set up your environment variables by copying the example file:
cp .env.example .env
- Edit
.envwith your Lightdash credentials:
LIGHTDASH_INSTANCE_URL="https://your-instance.lightdash.com"
LIGHTDASH_ACCESS_TOKEN="your-access-token"
LIGHTDASH_PROJECT_UUID="your-project-uuid"
- Install development dependencies:
just install
Available Commands
View all available commands:
just
Common commands:
just install- Install development dependenciesjust test- Run acceptance testsjust build- Build package distributionsjust clean- Remove build artifacts
Publishing
Setting up PyPI credentials
Create a ~/.pypirc file with your PyPI API tokens:
[pypi]
username = __token__
password = your-pypi-token-here
[testpypi]
username = __token__
password = your-testpypi-token-here
Make sure to:
- Use API tokens instead of your actual username/password
- Keep the file secure (
chmod 600 ~/.pypirc) - Never commit this file to version control
- Use different tokens for TestPyPI and PyPI
- Generate tokens with minimal required permissions
Publishing to PyPI
First, test your package on TestPyPI:
just publish-test
If everything looks good on TestPyPI, publish to PyPI:
just publish
Note: The package version in pyproject.toml must be incremented for each new release.
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lightdash-1.1.0.tar.gz.
File metadata
- Download URL: lightdash-1.1.0.tar.gz
- Upload date:
- Size: 41.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
784a9f8be3cd3f1d7376ba046c802d0af29dc6f9f152fc01a97c67e685463da7
|
|
| MD5 |
fb8991048837a7d3e97aa031a4b0e8c1
|
|
| BLAKE2b-256 |
e8be677fa64659df19c3c9d81a4b3decf3ac98e9f6fb41ad3d031843cdb353da
|
Provenance
The following attestation bundles were made for lightdash-1.1.0.tar.gz:
Publisher:
release.yml on lightdash/python-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lightdash-1.1.0.tar.gz -
Subject digest:
784a9f8be3cd3f1d7376ba046c802d0af29dc6f9f152fc01a97c67e685463da7 - Sigstore transparency entry: 2019778137
- Sigstore integration time:
-
Permalink:
lightdash/python-sdk@482a44f97beba14aa7a63c0cb0074af2e4239f8d -
Branch / Tag:
refs/heads/main - Owner: https://github.com/lightdash
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@482a44f97beba14aa7a63c0cb0074af2e4239f8d -
Trigger Event:
push
-
Statement type:
File details
Details for the file lightdash-1.1.0-py3-none-any.whl.
File metadata
- Download URL: lightdash-1.1.0-py3-none-any.whl
- Upload date:
- Size: 30.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2173c3708470ac8bccb8e8c3ff9801e1cd5bcc5524ea686ccadafdb5176168fc
|
|
| MD5 |
d3c75856461860a32ee1f6462c8fdacf
|
|
| BLAKE2b-256 |
43046c8f119a3afdf65b457e621efc6fc232c80068dd815a3989540b9a1c024b
|
Provenance
The following attestation bundles were made for lightdash-1.1.0-py3-none-any.whl:
Publisher:
release.yml on lightdash/python-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lightdash-1.1.0-py3-none-any.whl -
Subject digest:
2173c3708470ac8bccb8e8c3ff9801e1cd5bcc5524ea686ccadafdb5176168fc - Sigstore transparency entry: 2019778243
- Sigstore integration time:
-
Permalink:
lightdash/python-sdk@482a44f97beba14aa7a63c0cb0074af2e4239f8d -
Branch / Tag:
refs/heads/main - Owner: https://github.com/lightdash
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@482a44f97beba14aa7a63c0cb0074af2e4239f8d -
Trigger Event:
push
-
Statement type: