使用restfull api的remotsy库
remotsylib3的Python项目详细描述
删除python库
Remotsy是红外爆炸装置,由云层控制, 这是一个python库,通过rest api控制remotsy设备。
安装
$ pip install remotsylib3
示例
fromremotsylib3.api_asyncimport(API,run_remotsy_api_call)if__name__=="__main__":client=API()#Do the login and get the tokentoken=run_remotsy_api_call(client.login(args.username,args.password))#Get the list of the controlslst_ctl=run_remotsy_api_call(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