访问nut服务器的python抽象类。

nut2的Python项目详细描述


Build StatusTest CoverageCode HealthPyPi Version

这是对python库PyNUT的api彻底检查,它允许与nut通信 (Network UPS Tools)服务器。

note:这是一个非正式的项目,不受支持,或者 由Network UPS Tools developers背书

要求

模块本身只需要Python(已知可以在2.6到2.6版本中使用 3.4条)如果要运行测试,请执行pip install -rrequirements-testing.txt

用法

示例:

from nut2 import PyNUTClient
client = PyNUTClient()
client.help()
client.list_ups()
client.list_vars("My_UPS")

请注意,本模块已完全故意损坏 与PyNUT 1.X向后兼容

有关更多使用信息,请参阅内联文档。

安装

只需使用pip:

pip install nut2

胡桃

以下信息是从原始pynut自述文件复制的:

This directory contains various NUT Client related Python scripts, written by David Goncalves, and released under GPL v3.

  • “module”: this directory contains PyNUT.py, which is a Python abstraction class to access NUT server(s). You can use it in Python programs to access NUT’s upsd data server in a simple way, without having to know the NUT protocol.

To import it on Python programs you have to use the following (case sensitive) : ‘import PyNUT’

This module provides a ‘PyNUTClient’ class that can be used to connect and get data from an upsd data server.

To install the PyNUT module on Debian/Ubuntu, copy it to: /usr/share/python-support/python-pynut/

This directory also contains test_nutclient.py, which is a PyNUT test program. For this to be fully functional, you will need to adapt the login, password and upsname to fit your configuration.

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

推荐PyPI第三方库


热门话题
ArrayList中实体对象上的JAVA泛型   带Redis的爪哇芹菜vs单用Redis   java在设备面向横向时隐藏标题栏/通知栏   java JXTreeTable:如何使用ComponentProvider为一列设置渲染器   java创建异常的成本与记录异常的成本相比   java在方法参数中使用setter传递新对象   java在一个类中的方法与另一个类中的方法交互时遇到问题   java如何迭代2个大小相等的ArrayList   Java getDesktop()。open在Windows中工作,但在Mac中不工作   从tomcat切换到jetty后的java“无法启动嵌入式容器”,Spring引导   java如何使用void方法   java如何在解组时在JAXB的ValidationEventHandler中获取节点值?   如何使用Akka Java API创建不响应的TCP接收器   JavaScriptjQuery在java中将记录上传到数据库时的进度条   如何在重新绘制时在java小程序中显示上一个图像