2024-09-29 18:55:57 发布
网友
如何在pythonazure函数中使用队列输出绑定。这是我的函数.json在
{ "type": "queueTrigger", "name": "myQueue", "direction": "out", "queueName": "qname", "connection": "CONNECTION" }
我的代码以这个结尾
我只是遇到一个错误,无法打开QueueAttribute进行写入。任何人都有这方面的经验,因为根本没有文档。在
我尝试在pythonazure函数中使用队列存储输出绑定,它对我很好,我没有重现您的问题。在
你可以参考我的步骤。在
步骤1:为Python创建HttpTrigger。在
步骤2:配置队列存储输出绑定,如下所示。在
第三步:检查运行.py代码和函数.json在
运行.py
import os import json postreqdata = json.loads(open(os.environ['req']).read()) response = open(os.environ['res'], 'w') response.write("hello world from "+postreqdata['name']) response.close()
函数.json
步骤4:运行函数并检查存储队列消息。在
您也可以引用official tutorial和Queue Storage Output Binding Configuration。在
希望对你有帮助。在
我尝试在pythonazure函数中使用队列存储输出绑定,它对我很好,我没有重现您的问题。在
你可以参考我的步骤。在
步骤1:为Python创建HttpTrigger。在
步骤2:配置队列存储输出绑定,如下所示。在
第三步:检查运行.py代码和函数.json在
运行.py
函数.json
^{pr2}$步骤4:运行函数并检查存储队列消息。在
您也可以引用official tutorial和Queue Storage Output Binding Configuration。在
希望对你有帮助。在
相关问题 更多 >
编程相关推荐