Created
December 6, 2018 03:55
-
-
Save chriscalip/684b95ddfb3191711c9fc68e714dd864 to your computer and use it in GitHub Desktop.
initial try swagger-api/swagger-client python
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import swagger_client as looker | |
# replace with your custom Looker API Host domain and port, if applicable. | |
base_url = 'https://your.looker.instance:19999/api/3.0/' | |
client_id = 'your-API3-client-id' | |
client_secret = 'your-API3-client-secret' | |
unauthenticated_client = looker.ApiClient(configuration=None) | |
unauthenticated_authApi = looker.ApiAuthApi(unauthenticated_client) | |
token = unauthenticated_authApi.login(client_id=client_id, client_secret=client_secret) | |
client = looker.ApiClient(base_url, 'Authorization', 'token ' + token.access_token) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment