A NUT client for Python 3.13+
Project description
noix – yet another NUT client library
noix (French for nut, pronounced /nwa/) is a client library that allows to communicate with a compatible Network UPS Tools (NUT) server.
Installation
To use this package, create a virtual environment and install with PIP:
python -m venv .venv
source .venv/bin/activate
pip install noix
Usage
First, create a NUT object with your server information.
For instance, if your server runs on the same machine and your UPS is named my_ups:
from noix import NUT
server = NUT("127.0.0.1", "my_ups", username="myusername", password="myverysecurepassword")
You can now use your object to get your UPS information:
# Print the battery charge:
print(await server.get("battery.charge"))
To change a variable value:
# Set the battery charge low alert threshold to 15%:
await server.set("battery.charge.low", 15)
[!note] The new value in the
set()method can be of any native type or a stringable object.
You can also call a command:
# Turn off the UPS:
await server.call("load.off")
To get a list of the commands and variables exposed by the UPS:
await server.list_commands()
await server.list_vars()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file noix-1.0.0.tar.gz.
File metadata
- Download URL: noix-1.0.0.tar.gz
- Upload date:
- Size: 7.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.1 CPython/3.13.7 Linux/6.11.0-1018-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bf3e3db666b6a72bc4469a3eeb18c5d3da49bc558ace495fa9986f63831db311
|
|
| MD5 |
b1cace1377bde5bad167c133334a1318
|
|
| BLAKE2b-256 |
0865b58ebb9ebcddda7cc33f2019e3a952587dd50c0be01e8aa9e49b388e0b9e
|
File details
Details for the file noix-1.0.0-py3-none-any.whl.
File metadata
- Download URL: noix-1.0.0-py3-none-any.whl
- Upload date:
- Size: 8.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.1 CPython/3.13.7 Linux/6.11.0-1018-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
573c6522c15208afc6294d7b7c320ed361cea3976f5061823b35266987b39d57
|
|
| MD5 |
f983dfd64356944adf7d94d4f6b0a440
|
|
| BLAKE2b-256 |
443afabcccc6acbe01babb487fc16f4fd0e090f1e0566dc485af7fd91eda276b
|