APD传感器组件
apd.sensors的Python项目详细描述
高级python开发传感器
这是构成运行示例一部分的数据收集包 为了这本书Advanced Python Development。
用法
这将安装名为sensors
的控制台脚本,该脚本返回
系统的各个方面。可用的传感器有:
- python版本
- IP地址
- CPU使用率
- RAM可用
- 电池充电状态
- 环境温度
- 环境湿度
没有命令行选项,无法在 命令行。
注意事项
环境温度和环境湿度传感器仅在
raspberrypi承载并假设dht22传感器连接到pinD20
。
如果在/etc/hosts
中有当前计算机主机名的条目
值将是IP地址传感器的唯一结果。
安装
使用python 3.7或更高版本下的pip3 install apd.sensors
安装
更改
1.0.0(2019-06-20)
- 添加了初始传感器(Matthew Wilkes)
Copyright (c) 2019 Matthew Wilkes
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.