Skip to main content

A pythonic api for programatically manipulating LookML

Project description

pyLookML allows you to fetch, parse and program lookml very easily. It is an object oriented metaprogramming interface built on top of the AWESOME lkml parsing library which you can check out here: https://github.com/joshtemple/lkml. But extends it by adding convenience to it's json structure and more advanced integrations and object oriented behaviors. Check out the full documentation for pyLookml project here: https://lookml.readthedocs.io/en/latest/

In the meantime here are some very basic examples for getting started:

get started fast: pip install lookml

Connect to a lookml github project:

   import lookml
   proj = lookml.Project(
         repo= "llooker/russ_sandbox",
         access_token="your_github_access_token",
   )
   viewFile = proj.getFile('01_order_items.view.lkml')
   orderItems = viewFile.views.order_items
   print(orderItems.id)

Pure lookml generation:

import lookml

#create a new view
order_items = lookml.View('order_items')

# add a couple fields
order_items + 'id' + 'value'

# add a sum measure
order_itmems.addSum('id')

# order_items.view.lkml will be written in working directory
order_items.write()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for lookml, version 2.0.0
Filename, size File type Python version Upload date Hashes
Filename, size lookml-2.0.0-py3-none-any.whl (20.2 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size lookml-2.0.0.tar.gz (20.0 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page