如何使用来自IPython的googleapipythonclient进行OAuth?

2024-10-03 06:27:23 发布

您现在位置:Python中文网/ 问答频道 /正文

我想登录到谷歌,并得到一个令牌在IPython使用。我找到的所有示例都需要填写scopenextconsumer_key或更糟的内容:我的密码。。。你知道吗

理想情况是这样的:

>>> import googleapiclient.auth
>>> a = gdata.auth(scope='http://photos.google.com', username='mygooglename')
>>> a.get_token()
http://google.com/auth?token=jdlkfjwrefgjroiwfofewjhfejehk

>>> g = gdata.photos.PhotosService(a)

有类似的吗?你知道吗


Tags: keycomtokenauthhttp密码示例内容