Skip to main content

Python API for communication with Synology DSM

Project description

https://travis-ci.org/StaticCube/python-synology.svg?branch=master

Installation

[sudo] pip install python-synology

Usage

Module

You can import the module as SynologyDSM.

from SynologyDSM import SynologyDSM

print("Creating Valid API")
api = SynologyDSM("<SynologyIp>", "<SynologyPort>", "<Username>", "<Password>")

print("=== Utilisation ===")
print("CPU Load:   " + str(api.utilisation.cpu_total_load) + " %")
print("Memory Use: " + str(api.utilisation.memory_real_usage) + " %")
print("Net Up:     " + str(api.utilisation.network_up()))
print("Net Down:   " + str(api.utilisation.network_down()))

print("=== Storage ===")
volumes = api.storage.volumes
for volume in volumes:
    print("ID:         " + str(volume))
    print("Status:     " + str(api.storage.volume_status(volume)))
    print("% Used:     " + str(api.storage.volume_percentage_used(volume)) + " %")

disks = api.storage.disks
for disk in disks:
    print("ID:         " + str(disk))
    print("Name:       " + str(api.storage.disk_name(disk)))
    print("S-Status:   " + str(api.storage.disk_smart_status(disk)))
    print("Status:     " + str(api.storage.disk_status(disk)))
    print("Temp:       " + str(api.storage.disk_temp(disk)))

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

python-synology-0.1.0.tar.gz (5.0 kB view details)

Uploaded Source

File details

Details for the file python-synology-0.1.0.tar.gz.

File metadata

File hashes

Hashes for python-synology-0.1.0.tar.gz
Algorithm Hash digest
SHA256 350266aa1279539da82ee9195e299ae1a8ded3061df21a23f6816e45de094ed4
MD5 36e000642b07ab0ad84b2383900022e6
BLAKE2b-256 cf3e632fb7dad299d072d7a045e626113b3d5c9a2214a199b3894928e1e31c67

See more details on using hashes here.

Provenance

Supported by

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