我有一个用 Python 编写的 HTTP 触发的 Azure 函数。我还有一个 CosmosDB 容器,其中包含一个不带参数的存储过程。如何从 Azure Function 的 Python 代码中调用此存储过程?
- 查看 Cosmos 文档后,我知道可以为 Cosmos DB 创建一个 HTTP 触发器,将请求发送到适当的 URL,但我无法确定这是否有必要,如果有的话,有任何 Azure Python 模块可以创建必要的 URL 和样板。
- 我无法在 Azure Functions 文档中找到存储过程的绑定(bind)。
import azure.functions as func
def main(req: func.HttpRequest) -> func.HttpResponse:
# What do I type here?
return func.HttpResponse(....)
最佳答案
如何调用存储过程请引用python官方文档LINK .
此外,没有输出绑定(bind)来触发 Cosmos DB 存储过程。
关于python - 如何在 Python 中从 Azure Function 调用 Cosmos DB 存储过程?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70231660/