【问题标题】:How to access Google Cloud Platform Firestore triggers from Python runtime cloud functions如何从 Python 运行时云函数访问 Google Cloud Platform Firestore 触发器
【发布时间】:2019-02-06 22:48:55
【问题描述】:

GCP 已向云函数添加了对 Python 运行时的支持。

GCP 还将 Firestore 扩展到通用 GCP 生态系统(而不是仅适用于 Firebase)

但是,缺少有关如何从 python 云函数侦听 Firestore 触发器的文档,目前仅提供给 node

是否有(或将有)从 python 云函数访问 Firestore 触发器的方法?

【问题讨论】:

    标签: python firebase google-cloud-platform google-cloud-firestore


    【解决方案1】:

    目前在使用 Python 的 Cloud Functions 中不支持 Firestore(或其他 Firebase 产品事件触发器)。

    没有可用的时间表来保证将来何时可以获得支持。

    【讨论】:

      【解决方案2】:

      GCP 现已发布了对支持 firestore 触发器的 Python 运行时函数的测试版支持。

      Google Cloud Firestore Triggers

      【讨论】:

        【解决方案3】:

        检查后我发现它们已经为 Python3.7 实现了。我自己通过 UI 对其进行了测试,它确实有效。我还在文档[1] 中看到了这一点,告诉它已经实现:

        --runtime RUNTIME - 您正在使用的运行时的名称,例如 nodejs6、nodejs8 或 python37。

        请记住,Firestore 触发器和带有 Python 的 CF 都处于测试阶段。

        注意:我的测试使用 GCP,没有 Firebase。

        【讨论】:

          猜你喜欢
          • 2018-03-27
          • 1970-01-01
          • 2018-03-27
          • 1970-01-01
          • 2018-11-21
          • 2020-04-23
          • 1970-01-01
          • 1970-01-01
          • 2018-02-20
          相关资源
          最近更新 更多