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.4.tar.gz (8.0 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.4-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: wdnas_client-0.9.4.tar.gz
  • Upload date:
  • Size: 8.0 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.4.tar.gz
Algorithm Hash digest
SHA256 5bca5647efe99e6ecc3aa537f97ddf5a27011248f7d5018d28774e66bf3ed6fb
MD5 8bc153b57b6263706ffe94f92b48911d
BLAKE2b-256 a44df20f4e5b2bbaee3b70b6614485dab0f2bdedf0f8ca859abe487e391abd62

See more details on using hashes here.

File details

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

File metadata

  • Download URL: wdnas_client-0.9.4-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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 f6bab8140f6a7a2f2a131f06501eb9cb2be011c4cfedc8e6579f20f4abcebfa4
MD5 c158e4b3ba3efd995eacc5a5cae968ee
BLAKE2b-256 a25b0cf465739a54d925e0489e9cb5d686938b6b140c6b6819690b0dd8e7af3c

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