Generating Client SDKs for the Looker API

sdk
api
python

(leticia.esparza) #41

Hey @Marc_Wilson,

I hope all is well! I did some research regarding this and found that the open API spec that our swagger file follows can be used by swagger to generate SDKs; however, we currently don’t do anything on our end to make it work for specific languages. In the swagger-codegen repository it is noted that .NET is supported as a client SDK but .NET Core is supported as a server stub. So it’s not necessarily that Looker does not support dotnet core, but rather it appears that swagger codegen does not currently support a client for .NET core. It only supports generating server stubs, which would not work since Looker is the server. Let me know if I can clarify anything about this on my end!

Best,

Leticia


(longfei) #42

Hey Danny, thanks for the great documentation!

I found the “Generate a Looker API Client SDK” step sort of confusing and took me awhile to get it to work because:

  1. There two lines with 1. before it.
  2. it wasn’t clear the the multiple lines for the python command is supposed to be one command
  3. the back slashes are actually not supposed to be part of the command

So I’d suggest replacing it with the following!

Generate a Looker API Client SDK
To generate a Looker API client SDK for Python, do this:

  1. cd looker_sdk
  2. java -jar ./swagger-codegen/modules/swagger-codegen-cli/target/swagger-codegen-cli.jar generate -i lookerapi.json -l python -o python_sdk

(Danny Thorpe) #43

Hi Dan,

Is there any plan to distribute examples of using the swagger generated api’s in languages such as Java?

Yes! We are investigating requirements and scoping out the work required to deliver pre-built Looker client SDKs for a variety of languages (including Java) and be able to show Looker API example snippets in the same set of languages as well.

There’s a lot of work that has to be done to make that happen, but yes, it is on our radar (not just on the wish list!). I really (really) want to remove this swagger-codegen step from the Looker SDK bootstrap as it is a rather large, frustrating barrier to entry. We can make this easier for you all! :slight_smile:

-Danny


(Dan Groman) #44

Danny thanks for the response. Examples of Java API’s are the last thing on wish list at the moment as we have a slew of other functionalities we’d like fixed. Glad to know it’s moving forward. Thanks for the reply.