Automatically detects the location of the synology drive client folders and returns its parent location.
Project description
PySynClient
Automatically detects Synology Drive Client sync folders on Windows and provides stable, device-independent access to their local paths.
Unlike the Synology Drive Client's internal numeric indices (which can shift between machines or when NAS connections change), PySynClient keys everything by NAS hostname and share name — identifiers that stay consistent across devices.
Installation
pip install pysynclient
Usage
Get sync folder paths
import pysynclient
paths = pysynclient.get_server_paths()
# {
# "my-nas": {
# "home": Path("D:/SynologyDrive/home"),
# "datasets": Path("D:/SynologyDrive/datasets"),
# "photos": Path("D:/SynologyDrive/photos"),
# }
# }
# Access a specific folder
datasets = paths["my-nas"]["datasets"]
List connected NAS systems
hosts = pysynclient.get_nas_hosts()
# ["my-nas"]
Get detailed connection info
info = pysynclient.get_connection_info()
# {
# "my-nas": {
# "host_name": "my-nas",
# "server_name": "my-nas.example.com",
# "server_ip": "10.0.0.1",
# "username": "admin",
# }
# }
Example: Building a cross-device file path
import pysynclient
paths = pysynclient.get_server_paths()
# Works on any machine connected to this NAS — no hardcoded paths
model_weights = paths["my-nas"]["datasets"] / "models" / "weights.pt"
Requirements
- Windows (Synology Drive Client stores its data in
%LOCALAPPDATA%) - Synology Drive Client installed and connected to at least one NAS
- Python >= 3.10
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pysynclient-0.2.0.tar.gz.
File metadata
- Download URL: pysynclient-0.2.0.tar.gz
- Upload date:
- Size: 16.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
100763cd0848458c7b068604ef8f930a4e38ee21865f0fb595cbab45b2a60f26
|
|
| MD5 |
c1afce6f0429020db53175c29f41d15e
|
|
| BLAKE2b-256 |
676c6b3431a0c3361373f60c938c00a1ca01fcb7c77046a9f5565bd1b975aa14
|
File details
Details for the file pysynclient-0.2.0-py3-none-any.whl.
File metadata
- Download URL: pysynclient-0.2.0-py3-none-any.whl
- Upload date:
- Size: 16.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
305f0344d99f9d3af10d3802428aae3e41e26569c96c447777cb8d4ebe43ce08
|
|
| MD5 |
ebf0a677cdee7cb29599786aa2283749
|
|
| BLAKE2b-256 |
27589b8137e6031a27a6edf77f8ef00bda56caee5fe4a03d54d0431d4ad693c1
|