使用python在googleappengine上流式restapi

2024-04-19 02:24:31 发布

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

我正在尝试使用python调用googleappengine上的Nest REST流式API。https://developer.nest.com/documentation/cloud/rest-streaming-guide

正常的RESTAPI不是问题,但我想根据Nest设备上发生的一些更改向用户发送“推送”通知。。。在

Nest API使用firebase,可以使用流式REST API来监听API数据的更改;不幸的是,Google App Engine不支持firebase python库,因为缺少一些多处理功能 https://github.com/ozgur/python-firebase/issues/38

我找不到使用python请求来使用流式restapi的一些工作示例,除了tweepy,https://github.com/tweepy/tweepy/blob/master/tweepy/streaming.py一个python的twitter库,它应该在appengine上运行。 Tweepy还使用来自twitter的流式restapi。我试图效仿tweepy,但没有成功;我总是收到一个致命的例外。在

在googleappengine上实现streamrestapi客户端的正确方法是什么?有一些简单的工作样本吗?在


Tags: httpsgithubcomrestapirestapideveloper流式