zt-dlipower


Namezt-dlipower JSON
Version 0.0.5 PyPI version JSON
download
home_pagehttps://github.com/ztaira/zt-dlipower/
SummaryControl digital loggers web power switch
upload_time2024-02-05 17:26:59
maintainer
docs_urlNone
authorZach Taira
requires_python>=3.9,<4.0
licenseBSD
keywords network power switch ups
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![Build Status](https://cd.screwdriver.cd/pipelines/5669/badge?nocache=true)](https://cd.screwdriver.cd/pipelines/5669)
[![Package](https://img.shields.io/badge/package-pypi-blue.svg)](https://pypi.org/project/dlipower/)
[![Codestyle](https://img.shields.io/badge/code%20style-pep8-blue.svg)](https://www.python.org/dev/peps/pep-0008/)
[![Documentation](https://readthedocs.org/projects/dlipower/badge/?version=latest)](http://dlipower.readthedocs.org/en/latest/)

---

# 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

```python
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)
```

```console
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
```


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/ztaira/zt-dlipower/",
    "name": "zt-dlipower",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9,<4.0",
    "maintainer_email": "",
    "keywords": "network,power switch,ups",
    "author": "Zach Taira",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/9a/a4/0bf389d7259ed523f4055f21e33d909dcd7fd4615e43e1adbf845099747b/zt_dlipower-0.0.5.tar.gz",
    "platform": null,
    "description": "[![Build Status](https://cd.screwdriver.cd/pipelines/5669/badge?nocache=true)](https://cd.screwdriver.cd/pipelines/5669)\n[![Package](https://img.shields.io/badge/package-pypi-blue.svg)](https://pypi.org/project/dlipower/)\n[![Codestyle](https://img.shields.io/badge/code%20style-pep8-blue.svg)](https://www.python.org/dev/peps/pep-0008/)\n[![Documentation](https://readthedocs.org/projects/dlipower/badge/?version=latest)](http://dlipower.readthedocs.org/en/latest/)\n\n---\n\n# Digital Loggers Network Power Switch Python Module\n\nThis is a python module and a script to mange the\nDigital Loggers Web Power switch.\n\nThe module provides a python class named\nPowerSwitch that allows managing the web power\nswitch from python programs.\n\nWhen run as a script this acts as a command\nline utility to manage the DLI Power switch.\n\n# SUPPORTED DEVICES\nThis module has been tested against the following\nDigital Loggers Power network power switches:\n\n* ProSwitch\n* WebPowerSwitch II\n* WebPowerSwitch III\n* WebPowerSwitch IV\n* WebPowerSwitch V\n* Ethernet Power Controller III\n\n\n# Example\n\n```python\nimport dlipower\n\nprint(\"Connecting to a DLI PowerSwitch at lpc.digital-loggers.com\")\nswitch = dlipower.PowerSwitch(hostname=\"lpc.digital-loggers.com\", userid=\"admin\")\n\nprint(\"Turning off the first outlet\")\nswitch.off(1)\n\nprint(\"The powerstate of the first outlet is currently\", switch[0].state)\n\nprint('Renaming the first outlet as \"Traffic light\"')\nswitch[0].name = \"Traffic light\"\n\nprint(\"The current status of the powerswitch is:\")\nprint(switch)\n```\n\n```console\nConnecting to a DLI PowerSwitch at lpc.digital-loggers.com\nTurning off the first outlet\nThe powerstate of the first outlet is currently OFF\nRenaming the first outlet as \"Traffic light\"\nThe current status of the powerswitch is:\nDLIPowerSwitch at lpc.digital-loggers.com\nOutlet\tHostname       \tState\n1\tTraffic light  \tOFF\n2\tkiller robot   \tON\n3\tBuiten verlicti\tON\n4\tMeeting Room Li\tOFF\n5\tBrocade LVM123 \tON\n6\tShoretel ABC123\tON\n7\tShortel 24V - T\tON\n8\tShortel 24V - T\tON\n```\n\n",
    "bugtrack_url": null,
    "license": "BSD",
    "summary": "Control digital loggers web power switch",
    "version": "0.0.5",
    "project_urls": {
        "Homepage": "https://github.com/ztaira/zt-dlipower/",
        "Repository": "https://github.com/ztaira/zt-dlipower"
    },
    "split_keywords": [
        "network",
        "power switch",
        "ups"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5d981e03d81c60f2c29a1b6aa8834b92c623cba0cf02246d5a055e27a3de7b9c",
                "md5": "b3094ccb4b923aece5b1641c09f66ab9",
                "sha256": "8b78bc439f9fb3cf30bf04602d73293cdaaa6bfafec671c1490838a5df43c2ec"
            },
            "downloads": -1,
            "filename": "zt_dlipower-0.0.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b3094ccb4b923aece5b1641c09f66ab9",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9,<4.0",
            "size": 13416,
            "upload_time": "2024-02-05T17:26:58",
            "upload_time_iso_8601": "2024-02-05T17:26:58.454277Z",
            "url": "https://files.pythonhosted.org/packages/5d/98/1e03d81c60f2c29a1b6aa8834b92c623cba0cf02246d5a055e27a3de7b9c/zt_dlipower-0.0.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9aa40bf389d7259ed523f4055f21e33d909dcd7fd4615e43e1adbf845099747b",
                "md5": "abb15f2a8aa9ee46008f511a425de186",
                "sha256": "e4436b4ea905940827acf56fd0b7b228be73a310f1df37846d63661dd180ba83"
            },
            "downloads": -1,
            "filename": "zt_dlipower-0.0.5.tar.gz",
            "has_sig": false,
            "md5_digest": "abb15f2a8aa9ee46008f511a425de186",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9,<4.0",
            "size": 12088,
            "upload_time": "2024-02-05T17:26:59",
            "upload_time_iso_8601": "2024-02-05T17:26:59.893398Z",
            "url": "https://files.pythonhosted.org/packages/9a/a4/0bf389d7259ed523f4055f21e33d909dcd7fd4615e43e1adbf845099747b/zt_dlipower-0.0.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-05 17:26:59",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ztaira",
    "github_project": "zt-dlipower",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "zt-dlipower"
}
        
Elapsed time: 0.21739s