使用restfull api的remotsy python库
remotsylib的Python项目详细描述
删除python库
Remotsy是红外爆炸装置,由云层控制, 这是一个python库,通过rest api控制remotsy设备。
安装
$ pip install remotsylib
示例
fromremotsylib.apiimportAPIif__name__=="__main__":client=API()#Do the login and get the tokentoken=client.login(args.username,args.password)#Get the list of the controlslst_ctl=client.list_controls()forctlinlst_ctl:print"id %s Name %s"%(ctl["_id"],ctl['name'])
身份验证
您可以使用remotsy用户名和密码,但为了安全起见,建议生成 一个应用程序密码,登录https://home.remotsy.com并使用app passwords选项。
文档api
api文档和指向其他资源的链接可以在 https://www.remotsy.com/help