替代使用带有Pandas的Google表单的弃用方法

问题描述 投票:1回答:1

由于我是Python 3的新手,我想创建一个简单的Flask应用程序,使用Pandas将Google Forms转换为表格。这通常会很简单,但我发现的每个教程都与pbpython.com上的this example类似。

问题是几乎每个教程都使用SignedJwtAssertionCredentials模块中的oauth2client.client,这个模块不再受支持了。

所以我的问题有两个部分基于这个问题(因为我找不到使用谷歌的答案)。

1)SignedJwtAssertionCredentials有替代品吗?

2)如果我的Google表格向公众开放,我真的需要Oauth 2吗?因为我说这是一个例子。

TL; DR:我不知道该使用什么,因为SignedJwtAssertionCredentials不可用,我需要一个比我更有经验的人建议我一个Python + Google Forms的工作示例,以防我的问题已经得到解答。

python pandas google-form
1个回答
0
投票

这是最新代码https://github.com/googleapis/oauth2client/issues/401

    credentials = ServiceAccountCredentials.from_p12_keyfile(
        SERVICE_ACCOUNT_EMAIL,
        p12_key_path,
        scopes=['https://www.googleapis.com/auth/androidpublisher']
    )

    http = httplib2.Http()
    http = credentials.authorize(http)
    service = apiclient.discovery.build('androidpublisher', 'v3', http=http)
© www.soinside.com 2019 - 2024. All rights reserved.