Skip to main content

QNAP QSW API library

Project description

python-qnap-qsw is a Python module implementing an interface to the QNAP QSW API. It allows a user to gather all the information from a QNAP switch.

This package has been developed to be used with https://home-assistant.io/ but it can be used in other contexts.

Disclaimer

python-qnap-qsw was created for my own use, and for others who may wish to experiment with personal Internet of Things systems.

I have no connection with QNAP. I receive no help (financial or otherwise) from QNAP, and have no business interest with them.

This software is provided without warranty, according to the GNU Public Licence version 2, and should therefore not be used where it may endanger life, financial stakes, or cause discomfort and inconvenience to others.

Usage

>>> from qnap_qsw.interface import QSA
_qsa = QSA(host="host/url")
_qsa.login(user="admin", password="password")
_qsa.get_system_board()
_qsa.get_system_sensor()
_qsa.logout()
>>> import asyncio
from qnap_qsw.homeassistant import QSHA
_qsha = QSHA(host="host/url", user="admin", password="password")
asyncio.run(_qsha.async_identify())
print(_qsha.data())
asyncio.run(_qsha.async_update())
print(_qsha.data())
asyncio.run(_qsha.async_reboot())

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

qnap-qsw-0.0.5.tar.gz (15.3 kB view details)

Uploaded Source

File details

Details for the file qnap-qsw-0.0.5.tar.gz.

File metadata

  • Download URL: qnap-qsw-0.0.5.tar.gz
  • Upload date:
  • Size: 15.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.4.2 requests/2.26.0 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.9.2

File hashes

Hashes for qnap-qsw-0.0.5.tar.gz
Algorithm Hash digest
SHA256 e3d30c26471c2df5cb1280a673bffa2f9992494c9d181ab5770578ee6c58cc25
MD5 54ff96ea6ce3d3ca8f4db61b026f48ec
BLAKE2b-256 e1302d2f23a5a896e4c6f80de0e66a6377d1fef4c8745319d4592efa8f3e9c5e

See more details on using hashes here.

Supported by

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