Digital Loggers Network Power Switch Python Module
This is a python module and a script to mange the Digital Loggers Web Power switch.
The module provides a python class named PowerSwitch that allows managing the web power switch from python programs.
When run as a script this acts as a command line utility to manage the DLI Power switch.
SUPPORTED DEVICES
This module has been tested against the following Digital Loggers Power network power switches:
- ProSwitch
- WebPowerSwitch II
- WebPowerSwitch III
- WebPowerSwitch IV
- WebPowerSwitch V
- Ethernet Power Controller III
Example
import dlipower
print("Connecting to a DLI PowerSwitch at lpc.digital-loggers.com")
switch = dlipower.PowerSwitch(hostname="lpc.digital-loggers.com", userid="admin")
print("Turning off the first outlet")
switch.off(1)
print("The powerstate of the first outlet is currently", switch[0].state)
print('Renaming the first outlet as "Traffic light"')
switch[0].name = "Traffic light"
print("The current status of the powerswitch is:")
print(switch)
Connecting to a DLI PowerSwitch at lpc.digital-loggers.com
Turning off the first outlet
The powerstate of the first outlet is currently OFF
Renaming the first outlet as "Traffic light"
The current status of the powerswitch is:
DLIPowerSwitch at lpc.digital-loggers.com
Outlet Hostname State
1 Traffic light OFF
2 killer robot ON
3 Buiten verlicti ON
4 Meeting Room Li OFF
5 Brocade LVM123 ON
6 Shoretel ABC123 ON
7 Shortel 24V - T ON
8 Shortel 24V - T ON
Metadata
Release files for zt-dlipower 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| zt_dlipower-0.1.1.tar.gz | 11.8 kB | Without provenance | Details for zt_dlipower-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| zt_dlipower-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for zt_dlipower-0.1.1-py3-none-any.whl |
Total release size: 25.3 kB
Release files / zt_dlipower-0.1.1.tar.gz
| Download URL | zt_dlipower-0.1.1.tar.gz |
|---|---|
| Size | 11.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3837981774c586a3157b0b39d19fd1d9a04b3e40ab33cdd236967614feda3a6c
|
|
BLAKE2b-256 checksum How to use checksums |
8f8a46b4f69b8e4cdde126725147e099a10bf8bd5ef6f0d6e4dac78e46131161
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Release files / zt_dlipower-0.1.1-py3-none-any.whl
| Download URL | zt_dlipower-0.1.1-py3-none-any.whl |
|---|---|
| Size | 13.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
db8b97562720efcdeaee2c3adc5b43f43f290dbcbf7c0e3c98ede6471fb77b97
|
|
BLAKE2b-256 checksum How to use checksums |
aefb6cf962fa92b484b66af3b9203463a8c8173d66739dc114ddf8e1cdae2c01
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Security for zt-dlipower 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.