https://github.com/yu-iskw/lightdash-ops
A python-based CLI to operate Lightdash
https://github.com/yu-iskw/lightdash-ops
dbt lightdash python
Last synced: about 1 year ago
JSON representation
A python-based CLI to operate Lightdash
- Host: GitHub
- URL: https://github.com/yu-iskw/lightdash-ops
- Owner: yu-iskw
- License: apache-2.0
- Created: 2023-06-28T02:10:39.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2025-01-11T04:24:44.000Z (over 1 year ago)
- Last Synced: 2025-02-28T04:30:19.917Z (over 1 year ago)
- Topics: dbt, lightdash, python
- Language: Python
- Homepage: https://pypi.org/project/lightdash-ops/
- Size: 111 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# lightdash-ops
This is a python-based [Lightdash](https://www.lightdash.com/).
It focuses on to operate resources like users' roles and spaces on Lightdash by calling, as [the official CLI](https://docs.lightdash.com/api/v1/), as [The Lightdash CLI \| Documentation \| Lightdash](https://docs.lightdash.com/guides/cli/intro/) enables us to deploy projects and so on.
For instance, we can get members
## Install
```commandline
pip install -U lightdash-ops
```
## Settings
We can configure the API endpoint and so on with environment variables.
We can also take advantage of an `.env` file.
The template is located at [.env.template](.env.template).
```commandline
# .env
LIGHTDASH_URL=https://localhost:8000
...
```
### How to use
The CLI requires a personal access token to call the Lightdash APIs.
[The official documentation](https://docs.lightdash.com/references/personal_tokens/) describes how to get personal access tokens.
The CLI provides many sub commands.
Please refer to the detailed documentation in [docs/cli.ms](./docs/cli.md).
#### Example
The subsequent command is used to get all members in an organization.
```commandline
$ export LIGHTDASH_URL="https://localhost:8000"
$ export LIGHTDASH_API_KEY="YOUR-LIGHTDASH-PERSONAL-ACCESS-TOKEN"
$ lightdash-ops organization get-members
[
{
"member_uuid": "ade0aef5-bca8-4cbe-819b-07803390ffb0",
"email": "lightdash-member@example.com",
"role": "member"
},
{
"member_uuid": "d7ee948b-26d6-461a-b289-906cc7bb0c73",
"email": "lightdash-admin@example.com",
"role": "admin"
}
]
```