Skip to main content

noix – yet another NUT client library

Coverage Status

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()

Metadata

Release files for noix 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for noix 1.0.0
File Size Uploaded
noix-1.0.0.tar.gz 7.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for noix 1.0.0
File Interpreter ABI Platform
noix-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 15.5 kB

Release files / noix-1.0.0.tar.gz

Download URL noix-1.0.0.tar.gz
Size 7.3 kB
Tags Source
SHA-256 checksum
How to use checksums
bf3e3db666b6a72bc4469a3eeb18c5d3da49bc558ace495fa9986f63831db311
BLAKE2b-256 checksum
How to use checksums
0865b58ebb9ebcddda7cc33f2019e3a952587dd50c0be01e8aa9e49b388e0b9e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.2.1 CPython/3.13.7 Linux/6.11.0-1018-azure

Release files / noix-1.0.0-py3-none-any.whl

Download URL noix-1.0.0-py3-none-any.whl
Size 8.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
573c6522c15208afc6294d7b7c320ed361cea3976f5061823b35266987b39d57
BLAKE2b-256 checksum
How to use checksums
443afabcccc6acbe01babb487fc16f4fd0e090f1e0566dc485af7fd91eda276b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.2.1 CPython/3.13.7 Linux/6.11.0-1018-azure

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page