Skip to main content

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.Files
  • SYNO.SynologyDrive.Tasks
  • SYNO.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:123
  • SynologyPermanentLink("...") -> 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.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wcpan-synology 0.1.0
File Size Uploaded Provenance Actions
wcpan_synology-0.1.0.tar.gz 82.9 kB Without provenance Details for wcpan_synology-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for wcpan-synology 0.1.0
File Interpreter ABI Platform Actions
wcpan_synology-0.1.0-py3-none-any.whl Python 3 none any Details for wcpan_synology-0.1.0-py3-none-any.whl

Total release size: 96.1 kB

Release files / wcpan_synology-0.1.0.tar.gz

Download URL wcpan_synology-0.1.0.tar.gz
Size 82.9 kB
Tags Source
SHA-256 checksum
How to use checksums
5f7dd3046c7c300d3c2d7cf72e6eb63d6396d3897d8448f6ee40aa3bbf968e67
BLAKE2b-256 checksum
How to use checksums
a14d7207c16c074376a92ba8952329fb2ec0502115390fe57a8c05d400641b66
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.1.0-py3-none-any.whl

Download URL wcpan_synology-0.1.0-py3-none-any.whl
Size 13.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e88d8f6ba906359364b388b745aefba5eaa8e968f5903c73bfdd67245e6e1de6
BLAKE2b-256 checksum
How to use checksums
205b5adf7da600903dddb3e147994ae71a2c861f16de2bc1f327538c52568f66
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.1.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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page