Replies posted by Jake_Wellins
I was finally able to connect to the API, but the code from this page for updating filters before running a look does not run, is this the code I should be working with? Is there another place to find code samples that use the SDK? github.com llooker/python_api_samples/blob/master/update_filters_and_run_query.py import yaml # you must install the pyyaml package from lookerapi import LookerApi from pprint import pprint # Set host to a hostname in your config.yml file host = 'looker' f = open('config.yml') params = yaml.load(f) f.close() my_host = params['hosts'][host]['host'] my_secret = params['hosts'][host]['secret'] my_token = params['hosts'][host]['token'] looker = LookerApi(host=my_host, token=my_token, secret=my_secret) look_id = 1 This file has been truncated. show original
So I imported lookerapi, downloaded all of the .py files from this page: GitHub llooker/python_sdk The swagger generated code for python. Also available through pip install lookerapi - llooker/python_sdk and I have tried to run the code, but I get the error: AttributeError: module ‘lookerapi’ has no attribute ‘ApiClient’ But I have the api_client.py file in the same folder as the ipynb. I do appreciate the continued help.
Here is what happens when I run from lookerapi import LookerApi I do not understand this issue, I apologize for the basic question. Also, while it is helpful to see another way of authenticating, I then have to find another way to update the filters on a run by run basis, is there a different or better way to do this? I feel like I am using old information.
Already have an account? Login
Login to the community
No account yet? Create an account
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.