使用带有Pandas的googleforms替代不推荐的方法

2024-09-29 23:24:23 发布

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

因为我对python3还比较陌生,所以我想创建一个简单的Flask应用程序,使用Pandas将Google表单转换为表。这通常是相当简单的,但我找到的每个教程都类似于中的this examplepbpython.com网站. 你知道吗

问题是,几乎每个教程都使用不再支持的模块oauth2client.client中的SignedJwtAssertionCredentials。你知道吗

基于这个问题,我的问题分为两部分(因为我用Google找不到答案)。你知道吗

1)是否有替代SignedJwtAssertionCredentials的方法?你知道吗

2)如果我的Google表单对公众开放,我真的需要oauth2吗?因为正如我所说,这是一个例子。你知道吗

TL;DR:我不知道该用什么,因为SignedJwtAssertionCredentials是不可用的,我需要一个比我更有经验的人给我推荐一个Python+Google表单的工作示例,以防我的问题已经得到回答。你知道吗


Tags: 模块com应用程序flask表单pandas网站google
1条回答
网友
1楼 · 发布于 2024-09-29 23:24:23

这是最新的代码 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)

相关问题 更多 >

    热门问题