Metadata-Version: 1.1
Name: lookml-gen
Version: 0.1.2
Summary: Programmatically generate LookML
Home-page: https://github.com/symphonyrm/lookml-gen
Author: Joe Schmid
Author-email: jschmid@symphonyrm.com
License: Apache Software License 2.0
Description: ===============================
        LookML Generator
        ===============================
        
        
        .. image:: https://img.shields.io/pypi/v/lookml-gen.svg
            :target: https://pypi.python.org/pypi/lookml-gen
        
        .. image:: https://travis-ci.org/symphonyrm/lookml-gen.svg?branch=master
            :target: https://travis-ci.org/symphonyrm/lookml-gen
        
        .. image:: https://readthedocs.org/projects/lookml-gen/badge/?version=latest
            :target: http://lookml-gen.readthedocs.io/en/latest/?badge=latest
            :alt: Documentation Status
        
        .. image:: https://pyup.io/repos/github/symphonyrm/lookml-gen/shield.svg
            :target: https://pyup.io/repos/github/symphonyrm/lookml-gen/
            :alt: Updates
        
        
        Programmatically generate LookML
        
        
        * Free software: Apache Software License 2.0
        * Documentation: https://lookml-gen.readthedocs.io.
        
        
        Features
        --------
        
        * Generate LookML views programmatically
        * Include dimensions, dimension groups, filters, and measures in your views
        * Support Persistent Derived Tables (PDTs)
        * Write output to files or StringIO buffers
        
        Quick Start
        -----------
        
        Install it::
        
            pip install lookml-gen
        
        Use it::
        
            from lookmlgen import view
            from lookmlgen import field
        
            v = view.View('my_view')
            v.add_field(field.Dimension('id', sql='${TABLE}.id', type='number', primary_key=True))
            v.add_field(field.Dimension('c', sql='${TABLE}.c', type='number'))
            v.add_field(field.Measure('sum_c', sql='${TABLE}.c', type='sum'))
        
            with open('my_view.lkml', 'w') as f:
                v.generate_lookml(f)
        
        See it::
        
            # STOP! This file was generated by an automated process.
            # Any edits you make will be lost the next time it is
            # re-generated.
            view: my_view {
        
              dimension: c {
                type: number
                sql: ${TABLE}.c ;;
              }
        
              dimension: id {
                primary_key: yes
                type: number
                sql: ${TABLE}.id ;;
              }
        
              measure: sum_c {
                type: sum
                sql: ${TABLE}.c ;;
              }
            }
        
        TODOs
        -----
        
        Full LookML support is far from complete right now. At the moment only very basic
        aspects of Views and Fields are supported and there is no support for Explores yet.
        However, it does cover the most common functionality, including Persistent Derived
        Tables. The code can easily be extended and we'd love to get pull requests to fill
        out additional functionality.
        
        Credits
        ---------
        
        This package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.
        
        .. _Cookiecutter: https://github.com/audreyr/cookiecutter
        .. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage
        
        
        
        =======
        History
        =======
        
        0.1.0 (2017-04-17)
        ------------------
        
        * First release on PyPI.
        
        0.1.1 (2017-04-17)
        ------------------
        * Switch to lookmlgen for module name
        
        0.1.2 (2017-04-18)
        ------------------
        * Move primary_key from Field to Dimension
        * Remove stub for command line use
        * Add docstrings
        
Keywords: lookml-gen
Platform: UNKNOWN
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
