【发布时间】:2021-12-26 02:28:29
【问题描述】:
我想执行我认为相当简单的任务 - 我想使用 python 获取给定项目中的 Google Cloud Functions 列表,并想找出正确的库来执行此操作。
我试图了解https://github.com/googleapis 的无数回购。我可以看到有
然而在https://github.com/googleapis/google-api-python-client#other-google-api-libraries 声明:
此存储库的维护者建议在可能的情况下使用Cloud Client Libraries for Python 进行新代码开发
然后点击那里的链接将我带到
有一个链接
由于https://github.com/googleapis/google-api-python-client#other-google-api-libraries 中所述的原因,这似乎是更适合使用的库 (pip install google-cloud-functions)。
我遇到的问题是,似乎有很多示例/示例演示了 https://github.com/googleapis/google-api-python-client 的使用,但对于 https://github.com/googleapis/python-functions 的使用则较少。事实上,我的 google-fu 让我很失望,因为我找不到任何关于如何使用 https://github.com/googleapis/python-functions 来完成我的任务的示例(即获取 Google Cloud Functions 的列表)。 https://googleapis.dev/python/cloudfunctions/latest/index.html 的 API 文档有些帮助,但它似乎缺少示例代码。例如,我问自己的一个问题是我应该使用
或
或者甚至是别的东西。
谁能解释我如何使用CloudFunctionsServiceClient 或CloudFunctionsServiceAsyncClient 来获取函数列表?
【问题讨论】:
标签: python google-cloud-platform google-cloud-functions google-api-python-client