wcpan.synology
Async client library and CLI for the Synology Drive APIs exposed through DSM WebStation.
The documentation in docs/synology-webstation-api.md
covers the broader Synology Drive API family. The current library and CLI
surface in this repository focus on:
SYNO.SynologyDrive.FilesSYNO.SynologyDrive.TasksSYNO.SynologyDrive.Webhooks
Installation
uv add wcpan-synology
The package requires Python 3.12 or newer.
Usage
Namespaced API help:
uv run wcpan-synology help
uv run wcpan-synology help files
uv run wcpan-synology help files list
uv run wcpan-synology files list --help
Namespaced API call:
uv run wcpan-synology \
--base-url https://nas.example:5001 \
--username user \
--password secret \
files list \
--path "id:123" \
--limit 100
Python reference types:
from wcpan.synology import (
SynologyFileId,
SynologyPath,
SynologyPermanentLink,
create_client,
)
async with create_client(
base_url="https://nas.example:5001",
username="user",
password="secret",
) as client:
by_file_id = await client.get_file(SynologyFileId("123456"))
by_permalink = await client.get_file(
SynologyPermanentLink("https://nas.example/d/some-token")
)
listing = await client.list_folder(SynologyPath("/mydrive/Documents"))
Use these types when the API parameter is named path but the actual value is
not a DSM path string. This avoids mixing raw file ids, permanent links, and
plain paths in one untyped str. File identifiers are normalized to their
canonical Synology forms:
SynologyFileId("123")->id:123SynologyPermanentLink("...")->link:...
Generic API call:
uv run wcpan-synology \
--base-url https://nas.example:5001 \
--username user \
--password secret \
call \
--api SYNO.SynologyDrive.Files \
--version 11 \
--method list \
--param path='\"id:123\"' \
--param sort_by='\"name\"' \
--param sort_direction='\"asc\"'
Compatibility behavior
Folder creation, rename, and upload normalize destination names to Unicode NFC.
Uploads use the normalized name for both the destination path and multipart
filename. Scalar multipart fields intentionally omit Content-Type; only the
file part includes it, matching behavior verified against Synology servers.
Upload connection failures raise SynologyNetworkError, preserving the original
error for callers that implement retries. API code 1022 raises
SynologyUploadConflictError. Code 1035 raises SynologyNameTooLongError for
uploads and folder creation; it inherits SynologyPermanentUploadError, with
retryable = False and reason = "name_too_long". Other upload API failures raise
SynologyUploadError. These exceptions are available from wcpan.synology.
Development
make test
make lint
make coverage
make build
Metadata
Release files for wcpan-synology 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| wcpan_synology-0.2.0.tar.gz | 82.9 kB | Without provenance | Details for wcpan_synology-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| wcpan_synology-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for wcpan_synology-0.2.0-py3-none-any.whl |
Total release size: 96.1 kB
Release files / wcpan_synology-0.2.0.tar.gz
| Download URL | wcpan_synology-0.2.0.tar.gz |
|---|---|
| Size | 82.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9aa9d0e6054c24f14c7f55fb46d642c3e58b66af73da2f57db6858da42ce145c
|
|
BLAKE2b-256 checksum How to use checksums |
bfe802a1507163899e67667f2e76fd6794b5a5ae8dd53dc30706f073f94b9a28
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / wcpan_synology-0.2.0-py3-none-any.whl
| Download URL | wcpan_synology-0.2.0-py3-none-any.whl |
|---|---|
| Size | 13.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
771f0311494c64c743392fa2f09bda7ce3f61670ccc624568bf386bf232e6b8d
|
|
BLAKE2b-256 checksum How to use checksums |
d2642a2639371f26dfd5b6547a7d8304959d7cd60a8bd23be146be3906c1dec3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for wcpan-synology 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.