[Baypiggies] interfacing gdata.spreadsheet.service and oauth2client

Shannon -jj Behrens jjinux at gmail.com
Thu Aug 30 23:34:48 CEST 2012


Sorry it's taken me so long to respond. I know exactly the problem that
you're talking about because we had the same problem for YouTube APIs. It
turns out that you can use the newer Google APIs client library to do all
of your OAuth2 stuff and then futz with the GData client library to make
use of your OAuth2 tokens.

Here's a program (http://code.google.com/p/party-playlist-picker/) that
uses this hybrid trick. Just grep for gdata, OAuth2, etc. and you'll find
what you need.

Happy hacking, and sorry I didn't get this response back to you before your
deadline.

-jj

On Sun, Aug 19, 2012 at 10:19 PM, Glen Jarvis <glen at glenjarvis.com> wrote:

> I'm going to take another stab at this. I have written a program with a
> Google library called 'gdata.' When I wrote the program, it was a fairly
> small project and it was acceptable (although I didn't really like it) to
> put a username and a password in an external file and then read that file
> into the program and authenticate. This is how the gdata library seems to
> work (at least to the best of my knowledge (although I do think they
> support Oauth1 so I may have used that).
>
> Success brings it's own problems. I want to scale this program up many
> *many* times more than it's running now. Instead of a single gdata query
> running every six minutes or so, it now will run in bursts of 5K at a time.
> Possibly around 6K spread over an hour every hour.
>
> When seeing what would still work, the automatic program receives a
> "Captcha" assertion. I couldn't find what Google's limits were that caused
> this, but I received it just after a burst of 10 queries.
>
> Reading Google's online documentation, I need to use Oath2 for all of
> these services. Great! I like this -- especially the API console that's
> available to me (I'm using the Google Drive/Google Spreadsheet API). I have
> successfully used Google's oauth2client client library to authenticate and
> use Oauth2.
>
> However, my problem is that I can't stick these two libraries together. I
> don't see an easy way (or at least the designed way) to do this. I'm hoping
> that I'm missing something obvious and that I just need to learn how to
> interface with gdata better. It's a time crunch project (aren't they all)
> and so I really hadn't had the time to learn the gdata library well enough.
>
> Has anyone tried to stick these two libraries together? It seems something
> that I imagine many people are needing to do. Since I don't see a lot of
> Google responses/questions to this, I can only imagine I'm missing
> something painfully obvious and easy.
>
> So, for my second stab at asking, has anyone encountered this? Or, better
> yet, has anyone interface gdata with oauth2client python libraries?
>
>
> Cheers,
>
>
> Glen
>
>
>
> On Thu, Aug 16, 2012 at 5:36 PM, Glen Jarvis <glen at glenjarvis.com> wrote:
>
>> Has anyone tried to use the gdata.spreadsheet.service with Google's
>> Oauth2?
>>
>> I have a service that I've written that uses gdata.spreadsheet.service.
>> It used to use ProgrammaticLogin. I want to convert this to Oauth2. I
>> thought there would be work already in this area by now. But, I'm not
>> finding it.
>>
>> Has anyone else ran into this?
>>
>>
>> Cheers,
>>
>>
>> Glen
>> --
>>
>> "Pursue, keep up with, circle round and round your life as a dog does his
>> master's chase. Do what you love. Know your own bone; gnaw at it, bury it,
>> unearth it, and gnaw it still."
>>
>> --Henry David Thoreau
>>
>>
>
>
> --
>
> "Pursue, keep up with, circle round and round your life as a dog does his
> master's chase. Do what you love. Know your own bone; gnaw at it, bury it,
> unearth it, and gnaw it still."
>
> --Henry David Thoreau
>
>
> _______________________________________________
> Baypiggies mailing list
> Baypiggies at python.org
> To change your subscription options or unsubscribe:
> http://mail.python.org/mailman/listinfo/baypiggies
>



-- 
In this life we cannot do great things. We can only do small things with
great love. -- Mother Teresa
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/baypiggies/attachments/20120830/d7e6c6b7/attachment.html>


More information about the Baypiggies mailing list