Take data from private google spreadsheet
Question: I have a Google Spreadsheet which I'm sharing with several person. I want to
built a script to search for some rows and take cells values and process a
program locally afterwards. I was thinking going with python, as it seems
Google provide a good API for it.

Have someone an example on how to connect to Google Spreadsheet ? I read the
api, but I don't get how does the OAuth 2.0 thing works...

Many thanks :)


Answer: To perform read and write operations on a Google Spreadsheet, OAuth 2.0 will
not be necessary. As shown in these samples for
[reading](http://www.payne.org/index.php/Reading_Google_Spreadsheets_in_Python)
as well as [writing](https://www.mattcutts.com/blog/write-google-spreadsheet-
from-python/) to a Google Spreadsheet, in order to be able to access the
SpreadSheet you must include the username-password of the related account in
your in your code. And then using them in the following manner (as shown in
the writing sample) to access the Spreadsheet:

    
    
    spr_client = gdata.spreadsheet.service.SpreadsheetsService()
    spr_client.email = email
    spr_client.password = password
    spr_client.source = 'Example Spreadsheet Writing Application'
    spr_client.ProgrammaticLogin()
    

Also, do remember to `import gdata.spreadsheet.service` and any other related
library that you might need for your code. And if you're new,
[this](https://developers.google.com/gdata/articles/python_client_lib?hl=en#top_of_page)
would also be a good place to start. Hope this helps!

