WebDavClient is a Python package that downloads files and folders from a WebDAV host. Use it to communicate to a cloud storage provider (e.g. Nextcloud, ownCloud, Magenta, Synology NAS, QNAP NAS) and automate your personal storage tasks, in CI for example. Other solutions on PyPI did not fit my needs and/or were not actively maintained.
- Downloads a whole remote folder, subfolders included, keeping its structure (
download_all_files_iterative). - Binary wheels for Linux x64/arm64 and Windows x64/arm64, the pinned CPython with and without the GIL (cp314 and cp314t in v0.10.1).
- A pure-Python wheel that installs anywhere, and a
SHA256SUMSwith every release. - Every module compiled with Cython, the sources stripped from the binary wheels.
- Safe across threads: each download writes a private
.partfile and renames it into place. - Tested against a local mock WebDAV server, so no remote host is needed.
git clone --recurse-submodules --branch develop https://github.com/Kataglyphis/WebDavClient.git
cd WebDavClient
uv sync --all-extras --python 3.15 # the pinned CPython; 3.15t for the free-threaded buildfrom kataglyphis_webdavclient.webdavclient import WebDavClient
hostname = "https://yourhost.de/webdav"
username = "Schlawiner23"
password = "YOUR_PERSONAL_TOKEN"
remote_base_path = "MyProjectFolder"
local_base_path = "assets"
webdevclient = WebDavClient(hostname, username, password)
webdevclient.download_all_files_iterative(remote_base_path, local_base_path)Filter with extension=".md"; downloads raise on HTTP, listing or unsafe-path errors.
Release wheels, logging, the demo script and the tests:
docs/source/getting-started.md.
| Topic | Read |
|---|---|
| Getting started: installation, usage, tests, static analysis | docs/source/getting-started.md |
| The API | docs/source/webdavclient.rst, rendered on the docs site |
| Rules for agents and contributors | AGENTS.md |
| Changes | CHANGELOG.md |
WebDavClient is one of the Kataglyphis repositories, which share one way to contribute and one contact. Licence: MIT, see LICENSE.