用于与pertino通信的python包。

pertinosdk的Python项目详细描述


欢迎使用pertino python sdk

示例用法

'''
Created on Jul 26, 2014

@author: lwoydziak
'''frompertinosdkimportPertinoSdk,wherefromjsonconfigfileimportEnvdeftest_whenOrgsAvailableThenCanListThem():pertinoSdk=PertinoSdk(Env().get("Pertino","login"),Env().get("Pertino","password"))organizations=pertinoSdk.listOrgs()assertlen(organizations)>0deftest_whenDevicesInOrganizationsThenCanListThem():pertinoSdk=PertinoSdk(Env().get("Pertino","login"),Env().get("Pertino","password"))organizations=pertinoSdk.listOrgs()devices=pertinoSdk.listDevicesIn(organizations[0])assertlen(devices)>0deftest_deleteMachinesWithNameContainingAuto():pertinoSdk=PertinoSdk(Env().get("Pertino","login"),Env().get("Pertino","password"))organizations=pertinoSdk.listOrgs()devices=pertinoSdk.listDevicesIn(organizations[0],where("hostName").contains("auto"))pertinoSdk.deleteFrom(organizations[0],devices)assertnotpertinoSdk.listDevicesIn(organizations[0],where("hostName").contains("auto"))

建造

antenvantinitantpackage

运行单元测试

anttest

运行验收测试

使用pertino凭据创建一个文件(格式/名称请参见acceptance/conftest.py)

antacceptance

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java以编程方式最小化JInternalFrame?   java使用JsonPath将不均匀列表提取为类型化对象   spring如何将java/resources文件获取到InputStream?   Java逻辑错误并不总是存在   java Firebase,更新特定字段   Java stream groupby并同时加入以进行csv导出   java安卓:如果出现任何声音,监听器将录制声音   java如何从多个文件中轮询最后修改的文件并发送到apache camel中的目标端点?   java是否返回多个比较器?   JavaBean IO:Date MMM在CAPS中不解析   当JButton从另一个类单击时,java正在更新JLabel   基类中子类的Java泛型初始化   jakarta ee Java ee制作一个以毫秒为间隔的计时器来发送数据包   json Windows Azure日期格式转换为Java日期