Skip to content

Use google-auth library and requests instead of google-api-client #26

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
tswast opened this issue Apr 18, 2017 · 12 comments
Closed

Use google-auth library and requests instead of google-api-client #26

tswast opened this issue Apr 18, 2017 · 12 comments
Assignees

Comments

@tswast
Copy link
Collaborator

tswast commented Apr 18, 2017

The google-auth library provides a Requests interface.

The google-auth library is preferred over the oauth2client library.

Would this project be amenable to a PR to update how the requests to BigQuery are made?

@max-sixty
Copy link
Contributor

My working hypothesis is we should transition to the google.cloud.bigquery library over time, and that library can wrap any auth calls.

But I'm not a maintainer, and I may be missing something - is there a reason we would need to auth separately from that library?

@tswast
Copy link
Collaborator Author

tswast commented Apr 18, 2017

Yeah google.cloud.bigquery would be okay, but since we only need the query feature it might be overkill. Also, google-auth is 1.0, but google.cloud.bigquery is still going through breaking changes.

@jreback
Copy link
Contributor

jreback commented Apr 18, 2017

how much work would be involved to accept this an alternative? iow you try to import oauth2client if that fails you can this package else give up

@parthea
Copy link
Contributor

parthea commented Apr 18, 2017

I'm happy to help with testing/code review for this addition.

@parthea
Copy link
Contributor

parthea commented Apr 18, 2017

how much work would be involved to accept this an alternative? iow you try to import oauth2client if that fails you can this package else give up

This sounds great ( or vise-versa, if google-auth , else if oauth2client else give up)

@tswast
Copy link
Collaborator Author

tswast commented Apr 18, 2017

What's the reason for accepting either library?

@parthea
Copy link
Contributor

parthea commented Apr 19, 2017

What's the reason for accepting either library?

@tswast I see your point. Assuming that we can maintain the existing functionality of pandas-gbq with google-auth, then I agree we could drop oauth2client. @jreback , would that be ok?

Note: Historically, oauth2client was an optional dependency for pandas so we had to deal with the scenario where users did not have certain libraries. Now that we have migrated pandas.io.gbq to pandas-gbq as a separate package from pandas we have more control over the dependencies.

@jreback
Copy link
Contributor

jreback commented Apr 19, 2017

ok with changing dependencies. Though nice to have some back-compat. IOW I ok just adding this library, then deprecating the old.

@max-sixty
Copy link
Contributor

You guys know this better, but is it worth considering google.cloud.bigquery?

We have built a set of internal functions on this (which we're planning to move into this library). It takes care of a lot of the boilerplate.

Is there a compelling reason not to add this as a dependency?

@jreback
Copy link
Contributor

jreback commented Apr 19, 2017

thats #25; again which am happy to take, assuming things can be built/installed/tested properly.

@max-sixty
Copy link
Contributor

thats #25; again which am happy to take, assuming things can be built/installed/tested properly.

Then I think we can also use that library for auth (I believe it wraps google-auth), and this discussion would be moot.

I commented here; we can still use json keys with either the oauth2client or google-auth if we want to enable that

@tswast
Copy link
Collaborator Author

tswast commented May 23, 2017

I'll close this out in favor of eventually moving the API-calling code to google-cloud-python. I've got a separate PR open to move to the new auth library without changing the client libraries.

The queries wouldn't be too bad to do with a pure REST call, but the file uploads get a bit hairy, so having a library help with that is ideal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants