All Projects → bufferapp → pylooker

bufferapp / pylooker

Licence: MIT license
A Python interface to Looker API

Programming Languages

python
139335 projects - #7 most used programming language

Labels

Projects that are alternatives of or similar to pylooker

dbt2looker
Generate lookml for views from dbt models
Stars: ✭ 119 (+750%)
Mutual labels:  looker
lkml
A speedy LookML parser & serializer implemented in pure Python.
Stars: ✭ 134 (+857.14%)
Mutual labels:  looker
looker deployer
A tool to help deploy objects from one Looker instance to another
Stars: ✭ 18 (+28.57%)
Mutual labels:  looker
awesome-looker
MOVED TO GITLAB. A list/directory of awesome/helpful Looker and LookML work.
Stars: ✭ 18 (+28.57%)
Mutual labels:  looker

PyLooker

Build Status

A basic Python interface to Looker API.

Installation

You can use pip to install PyLooker.

pip install pylooker

If you prefer, you can clone it and run the setup.py file. Use the following commands to install PyLooker from Github:

git clone https://github.com/bufferapp/pylooker
cd pylooker
python setup.py install

Basic Usage

To use PyLooker you'll need to get the client_id and client_secret pair for your Looker user. You can request these to your Looker admin as stated in the Looker documentation.

from pylooker.client import LookerClient

api_endpoint = 'https://looker.company.com:19999/api/3.0/'
client_id = 'your-client-id'
client_secret = 'your-client-secret'
lc = LookerClient(api_endpoint, client_id, client_secret)

look_data = lc.run_look(1234)
query_data = lc.run_query('5A0lg9e7U7SNN8fquk0JKz')

The JSON results can be converted to a Pandas Dataframe:

import pandas as pd
df = pd.DataFrame(query_data)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].