Skip to main content

No project description provided

Project description

WDNAS-Client

PyPI Version

This module allows users to connect to their local WD NAS and view system info (storage capacity, disk temp, volumes, etc.). It is a work-in-progress and my first public Python module.

Initially built for my Home Assistant integration ha-mycloud. I thought I would make it into a python module for a bit of fun and to share the API systems for others to use.

Features

  • Fetches system info, share names, network status, and more.
  • Asynchronous library using asyncio and client.
  • Supports V2 and V5 WD NAS firmware.

Installation

pip install wdnas-client

Usage

Note: An admin account is required for the client to log in.

Here is a basic example of how to connect and pull data:

import asyncio
from wdnas_client import client

async def main():
    username = input("Username: ").lower()
    password = input("Password: ")
    host = '192.168.1.42'
    version = 2 # Can be 2 or 5
    
    async with client(username, password, host, version) as wdNAS:
        # V2 and V5 systems
        print("System Info:", await wdNAS.system_info())
        print("Share Names:", await wdNAS.share_names())
        print("System Status:", await wdNAS.system_status())
        print("Network Info:", await wdNAS.network_info())
        print("Device Info:", await wdNAS.device_info())
        print("System Version:", await wdNAS.system_version())
        print("Accounts:", await wdNAS.accounts())
        print("Alerts:", await wdNAS.alerts())

        # V2 systems only
        if version == 2:
            print("Latest Version:", await wdNAS.latest_version())

        # V5 systems only
        if version == 5:
            print("Cloud Access:", await wdNAS.cloud_access())
            print("USB Info:", await wdNAS.usb_info())
            print("Uptime:", await wdNAS.uptime())

if __name__ == "__main__":
    asyncio.run(main())

Documentation

For more detailed information, please see the docs folder:

  • Supported Models

    • A list of all tested and compatible NAS models and firmware versions.
  • API Reference

    • A detailed breakdown of the V2 and V5 API endpoints this integration uses.

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

wdnas_client-0.9.3.tar.gz (8.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wdnas_client-0.9.3-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file wdnas_client-0.9.3.tar.gz.

File metadata

  • Download URL: wdnas_client-0.9.3.tar.gz
  • Upload date:
  • Size: 8.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for wdnas_client-0.9.3.tar.gz
Algorithm Hash digest
SHA256 ad23bed7a021f443c9298a77839423de75363283682c9f21410f17c7a76fc080
MD5 41268a7b380841d4836eac28990487eb
BLAKE2b-256 1051799295b0f5e9fec82c82f4252620265a53e6d0d7b5ce5f0473a16f3d92aa

See more details on using hashes here.

File details

Details for the file wdnas_client-0.9.3-py3-none-any.whl.

File metadata

  • Download URL: wdnas_client-0.9.3-py3-none-any.whl
  • Upload date:
  • Size: 7.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for wdnas_client-0.9.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f69bc4b912a4e54b664d6649f39cbd05c156f3af4da14bd9a8381271e67102e9
MD5 6fc854e6b463a46d7973ec30ad03e927
BLAKE2b-256 17c5dbe783677c7ec5359fbff4def0245791acfa002ef43dc85ecbe93c753e5f

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