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

Updates the application to work with the latest oauth2client #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions fetch.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import json
import gspread
from oauth2client.client import SignedJwtAssertionCredentials
from oauth2client.service_account import ServiceAccountCredentials
from pprint import pprint

def run():
json_key = json.load(open('varsity-athletics-bdce819be77f.json'))

scope = ['https://spreadsheets.google.com/feeds']

credentials = SignedJwtAssertionCredentials(json_key['client_email'], json_key['private_key'].encode(), scope)
credentials = ServiceAccountCredentials.from_json_keyfile_name('varsity-athletics-bdce819be77f.json', scope)

gc = gspread.authorize(credentials)

Expand All @@ -21,4 +21,4 @@ def run():
print stuff

if __name__=='__main__':
run()
run()
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
gspread
oauth2client==1.5.2
PyOpenSSL
oauth2client
PyOpenSSL