Skip to content
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

Pass GoogleService Object as Credentials #50

Open
evyasonov opened this issue Jan 26, 2020 · 0 comments
Open

Pass GoogleService Object as Credentials #50

evyasonov opened this issue Jan 26, 2020 · 0 comments

Comments

@evyasonov
Copy link

Hey

Sometimes I use service account to connect to google services. It has different credentials. But also sometimes I use regular credentials. So I wrote a function which returns a service object, so I can use it to read from google sheet. Like this:

import apiclient
from google.oauth2 import service_account as google_service_account
...
credentials = google_service_account.Credentials.from_service_account_file(
                            credentialPath, scopes = scopes )
service     = apiclient.discovery.build(apiName, apiVersion, credentials = credentials)

Can you please change df2gspread.upload function, so I can pass to it service object

Thanks in advance

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

1 participant