Skip to content

Commit

Permalink
chore: Migrate to google-auth (oauth2client is deprecated), closes #60
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmckinney committed Apr 20, 2022
1 parent 15a7d44 commit 4b6aa6c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ocdskingfishercolab/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from urllib.parse import urljoin

import flattentool
import google.auth
import gspread
import requests
import sql
Expand All @@ -18,6 +19,7 @@

files = Mock()
files.download.return_value = None

from gspread_dataframe import set_with_dataframe
from IPython import get_ipython
from IPython.display import HTML
Expand Down Expand Up @@ -66,7 +68,8 @@ def authenticate_gspread():
:rtype: gspread.Client
"""
auth.authenticate_user()
return gspread.authorize(GoogleCredentials.get_application_default())
credentials, _ = google.auth.default()
return gspread.authorize(credentials)


def authenticate_pydrive():
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
# list a set of requirements that pip can resolve in both environments.
install_requires=[
'flattentool',
'google-auth',
'gspread',
'gspread-dataframe',
'ipython',
Expand Down

0 comments on commit 4b6aa6c

Please sign in to comment.