skillfed

lkml

A speedy LookML parser implemented in pure Python.

lkml v1.3.7 1.3M downloads/30d#4,076 on PyPI186
Permissive license MIT DORMANT released

What it is and what it does

lkml is a pure-Python LookML parser and serializer for Looker configuration files. It reads LookML text into Python dictionaries or JSON and writes Python objects back out as LookML syntax. The package has no external dependencies and is designed for speed—typical view or model files parse in under 10 milliseconds (excluding I/O). It is tested against over 160K lines of real LookML from public repositories.

You would use lkml when you need to programmatically read, transform, or generate Looker model and view definitions. Common scenarios include migrating Looker configurations, validating LookML syntax, generating models from templates, or integrating Looker definitions into a larger data pipeline or CI/CD workflow.

Use it for:

  • Validate or lint LookML files by parsing them and checking structure or naming conventions.
  • Generate LookML model and view definitions programmatically from Python data structures or templates.
  • Migrate or transform Looker configurations by reading, modifying, and rewriting LookML files.
  • Integrate Looker metadata into documentation or data catalog systems by parsing model definitions.
  • Build CI/CD checks that verify LookML syntax or consistency before deployment.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Parses LookML strings into Python objects or JSON and serializes Python objects back to LookML strings, with no external dependencies.

Yes. lkml is a stable, well-tested, dependency-free parser for a specific and narrow task (LookML serialization). It has no known vulnerabilities, permissive licensing, and low install friction. Dormant maintenance is acceptable for a mature, focused tool. Install it if you need to parse or generate LookML programmatically.

Install

lkml on PyPI

pip

pip install lkml

uv

uv add lkml

poetry

poetry add lkml

Installing lkml

Before you install

Low install friction—pure Python with no runtime dependencies. Dormant maintenance (last release 2025-01-31, 560 days ago), but the package is marked Production/Stable and has not been archived.

License in practice

MIT license (permissive) means you can use, modify, and distribute this package with minimal restrictions, provided you include the license notice.

Quickstart

pip install lkml

import lkml

# Parse LookML string to Python dict
model_dict = lkml.load('view: my_view { dimension: id { type: number } }')

# Serialize Python dict back to LookML string
lookml_str = lkml.dump(model_dict)

Verify before relying

  • Whether the parser handles all LookML syntax variations in active use beyond the 160K lines tested on GitHub.
  • Performance characteristics on very large or deeply nested LookML structures.
  • Python version support beyond 3.7 (requires_python is unspecified in the fact sheet).

Package facts

License MIT (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance dormant — 560 days since the last release
Last repo commit
First released
Downloads 1,309,583/month — #4,076 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: lkml-1.3.7-py2.py3-none-any.whl

Keywords: lookml, looker, parser

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3.7Topic :: Software Development

Tags

lookml parser pythonlooker configuration parserlookml serializerparse lookml fileslookml to jsonlookml code generatorlooker model parser
looker-integrationconfiguration-parser

More Software Development packages