Skip to main content

A Python abstraction class to access NUT servers.

Project description

Build Status Test Coverage Code Health PyPi Version

This is an API overhaul of PyNUT, a Python library to allow communication with NUT (Network UPS Tools) servers.

Note: This is an unofficial project, and is in no way supported or endorsed by the Network UPS Tools developers.

Requirements

The module itself requires only Python (known to work with versions 2.6 through 3.4). If you wish to run the tests, do pip install -r requirements-testing.txt.

Usage

Example:

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

Please note that this module has completely and intentionally broken backwards compatibility with PyNUT 1.X.

See inline documentation for more usage information.

Installation

Just use pip:

pip install nut2

PyNUT

The following information is copied from the original PyNUT README:

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nut2-2.1.0.tar.gz (19.0 kB view details)

Uploaded Source

Built Distribution

nut2-2.1.0-py2.py3-none-any.whl (5.9 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file nut2-2.1.0.tar.gz.

File metadata

  • Download URL: nut2-2.1.0.tar.gz
  • Upload date:
  • Size: 19.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for nut2-2.1.0.tar.gz
Algorithm Hash digest
SHA256 40e1de06f88527e6e23c6fefed2711857e56c2972110e57b84d4ec8095a80640
MD5 75be82e9eddc07520b1804147c1d8b47
BLAKE2b-256 2881b3a76b0ceeaba186ebfd6fb8777b18fdca10ecb55ac6fae81f6939a0f0ea

See more details on using hashes here.

File details

Details for the file nut2-2.1.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for nut2-2.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 694faf5d933f92a13e078efb8bee6a6fe876a884b13a2528ccfdbf282aa77b26
MD5 9458272c4d19e6c2eb4df6355ea014ec
BLAKE2b-256 416e63e6e419b06e9dbd089713d3648d36956956d64159a0a609f3fc6cd6744f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page