Skip to main content

Python Synology API Wrapper

Project description

synology-api Pepy Total Downloads Website

GitHub last commit GitHub License

Synology Wrapper

If you find yourself here, most probably you are trying to develop something for your NAS, this wrapper might come to your help to build your script.

I would like to specify that I do this for hobby as is my passion and in my little free time.

Said this, there is no warranties chained and this library is provided "As Is", you will find many things can be simplified, and I slowly will but feel free to Contribute.

Premise

I've tried this wrapper only with python3. I do not know if it actually runs with previous versions

Before opening an issue make sure you do your own research, if you are not sure, write me.

Installation

The package is distributed via pip3, but it can also be installed from source.

pip3 install synology-api

or

pip3 install git+https://github.com/N4S4/synology-api

Basic Usage

Here is a basic example on how to use the package, check Getting Started - Basic Usage for more details.

from synology_api.filestation import FileStation
from synology_api.downloadstation import DownloadStation

fs = FileStation(
    'Synology Ip',
    'Synology Port',
    'Username',
    'Password',
    secure=False,
    cert_verify=False,
    dsm_version=7,
    debug=True,
    otp_code=None
)

ds = DownloadStation(
    'Synology Ip',
    'Synology Port',
    'Username',
    'Password',
    secure=False,
    cert_verify=False,
    dsm_version=7,
    debug=True,
    otp_code=None
)

fs_info = fs.get_info()
ds_info = ds.get_info()

For NAS devices reachable through QuickConnect, pass the NAS QuickConnect ID instead of an IP address and port. QuickConnect uses HTTPS automatically.

fs = FileStation(
    quickconnect_id='QuickConnect ID',
    username='Username',
    password='Password',
    cert_verify=False,
    dsm_version=7,
    debug=True,
    otp_code=None
)

Available Functions

At the moment there are around +300 APIs implemented with countless methods for each, the majority is not documented, but some are.

You can find a exhaustive list here: APIs - Supported APIs

Feeling kind?

If this code helps and you wish to support me:

Community

See Related projects

If you want to show your project in this section, write me.

Bugs

Maybe?

I hate bugs..

Well report them please (if you'll ever use this code)

Conclusions

There is still a lot to implement.

The code is probably in some parts twisted, I will try to optimize it at best.

Contributing

Just Don't Be Scared. Check Contribute - Contribution 101 for useful information.

Author

  • Renato Visaggio - Initial Work - N4S4

Contributors

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

synology_api-0.9.0.tar.gz (256.2 kB view details)

Uploaded Source

Built Distribution

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

synology_api-0.9.0-py3-none-any.whl (256.7 kB view details)

Uploaded Python 3

File details

Details for the file synology_api-0.9.0.tar.gz.

File metadata

  • Download URL: synology_api-0.9.0.tar.gz
  • Upload date:
  • Size: 256.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for synology_api-0.9.0.tar.gz
Algorithm Hash digest
SHA256 0df96f789bcb0d099db8f45d15b076baf977752aff6fafd7559299b41d046310
MD5 042795b5624b6244fb7d8b2afea02383
BLAKE2b-256 39e731754f58c03827cbdd77bc10d1f68eff51d6f6e78f6508a8f3493cbae75f

See more details on using hashes here.

File details

Details for the file synology_api-0.9.0-py3-none-any.whl.

File metadata

  • Download URL: synology_api-0.9.0-py3-none-any.whl
  • Upload date:
  • Size: 256.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for synology_api-0.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2da02d865f8872f358660d466a752cf75ba0885b85efdc8c237aca4f372c1b43
MD5 32401c3b3c51038d50b5f958623edb3c
BLAKE2b-256 6027ae417a8aa94c30775a75bef65b4985d87cacf3cbce92d8db9a01189857f8

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