keystones-lookml
Gate a LookML view, explore or field on what it means, not on its labels.
A keystones keystone pins a
review gate to an AST node. LookML has no tree-sitter grammar, and its
description and label parameters churn constantly, so a text region trips
on every wording change. This parser plugin reads LookML with
lkml and drops those parameters from the
hash.
Install
pip install keystones-lookml
[[tool.keystones.language]]
extensions = [".lkml"]
parser = "keystones_lookml.parsers:lookml"
.lkml matches orders.view.lkml and orders.model.lkml by suffix. To drop
other parameters as well, or fewer:
parser = { plugin = "keystones_lookml.parsers:lookml", drop = ["label", "description", "group_label"] }
The drop list is part of the hasher, so changing it is a keystones migrate
rather than drift.
What a keystone covers
Every block is a definition, named by type and label under its parents:
view: orders {
# keystone(bi): total-spend
measure: total {
type: sum
sql: ${TABLE}.amount ;;
label: "Total"
}
}
That keystone is orders.view.lkml::view.orders.measure.total. A marker above
view: orders { covers the whole view; keystone(file) covers the file.
Explores and joins work the same way: explore.orders.join.users.
What counts as a change
| Edit | Result |
|---|---|
sql, type, filters, any parameter not dropped |
C3, the owner reviews |
description or label |
nothing |
| reordering parameters inside a block | nothing |
whitespace inside a sql expression |
nothing |
reordering items in a list such as filters |
C3, lists are ordered |
| a comment line inside the block | C4, fix clears it with no note |
License
MIT
Metadata
Release files for keystones-lookml 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| keystones_lookml-0.0.2.tar.gz | 12.2 kB | Without provenance | Details for keystones_lookml-0.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| keystones_lookml-0.0.2-py3-none-any.whl | Python 3 | none | any | Details for keystones_lookml-0.0.2-py3-none-any.whl |
Total release size: 19.3 kB
Release files / keystones_lookml-0.0.2.tar.gz
| Download URL | keystones_lookml-0.0.2.tar.gz |
|---|---|
| Size | 12.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a91a32899fb416e3b83a1b51d080d3429a8cc8c588ed41f2fd7a06cefab45193
|
|
BLAKE2b-256 checksum How to use checksums |
836a84d2a2c5521e7ee4b6cc6473aa44a01efce78801341710fbe4d6eeedba38
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / keystones_lookml-0.0.2-py3-none-any.whl
| Download URL | keystones_lookml-0.0.2-py3-none-any.whl |
|---|---|
| Size | 7.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cd1929e941ba8966590342900cd02d3e9b7ea5d024c86023b6f17343228866ae
|
|
BLAKE2b-256 checksum How to use checksums |
a942ccbc26dace695b44f10bcfeb4929e071108bb4eaaaf2acd794d712469973
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for keystones-lookml 0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.