未知
homegate的Python项目详细描述
python homegate
python homegate(https://github.com/arteria/python-homegate)是一个python库,用于使用idx3.01与homegate(http://www.homegate.ch)交互 应用程序编程接口。python homegate实现了官方idx3.01api,但不是homegate的官方库。对于所有与python homegate无关的问题、合同, 有关HomeGate的证书、问题等。请直接联系HomeGate AG!
对所有与pyhton homegate相关的问题、错误报告、功能请求等使用问题跟踪系统。
安装
如果要从pypi获得最新稳定版本的python homegate,请使用
pip install homegate
或者,如果您希望从github安装最新的greates commit,请使用
pip install -e git+https://github.com/arteria/python-homegate.git#egg=homegate
你应该通过选择第二个选项来知道你在做什么。;-)
用法
当前不工作-正在工作!
连接到HomeGate
>>> from homegate.homegate import Homegate, IdxRecord >>> hg = Homegate(MY_AGENCY_ID, HOST, USERNAME, PASSWORD)
创建空记录并设置/更新数据
>>> rec = IdxRecord() >>> rec.update({'object_city':'Basel', 'object_country':'CH'}) >>> rec.update({'picture_1_filename': '/Users/phi/Desktop/country-house.jpg', 'picture_1_title': 'Country house front view'})
发布(推送)到HomeGate并断开连接
>>> hg.push(rec) >>> del hg good bye >>>
选项
为idxrcords定义前缀。这允许ftp处理具有唯一的文件名。进程被触发 一天三次(6点、12点和18点)。
>>> rec_1234 = IdxRecord(prefix='1234-')
要同时推送多个记录,请传递一个记录列表。
>>> rec_2345 = IdxRecord(prefix='2345-') >>> rec_3465 = IdxRecord(prefix='3456-') >>> hg.push([rec_1234, rec_2345, rec_3465])
贡献
- 分叉python homegate存储库
- 对存储库进行注释良好且干净的提交
- 发送拉取请求(https://help.github.com/articles/using-pull-requests)
待办事项
- WIP:每个字段的类型和长度验证
更改日志
0.0.2
- 添加了convert to x函数,用于自动转换idx记录中字段的类型和长度。
0.0.1
Arteria GmbH开源了[Python HomeGate](https://github.com/arteria/python-homegate)的初始工作版本,允许使用IDx3.01 API将不动产对象和属性推送到HomeGate。