WebDAV Client 3 is a Python library designed for interacting with WebDAV servers. It provides an easy-to-use interface for common WebDAV operations such as listing, uploading, downloading, copying, moving, and deleting files and directories. This package is a continuation of the original `designerror/webdav-client-python` but leverages the popular `requests` library for HTTP communication instead of `PyCURL`. It is actively maintained, with the current version being `3.14.7`.
pip install webdavclient3Verified import paths — ran on the pinned version, not inferred.
Initializes a WebDAV client, lists root directory contents, and demonstrates creating a new directory. Credentials should be provided via environment variables for security, or directly in the `options` dictionary.
Upgrade to `webdavclient3==3.14.7` or later. Carefully review and test path constructions, ensuring consistent quoting and proper `webdav_hostname` configuration.
Upgrade to `webdavclient3==3.14.7` or later, which includes a fix for this issue.
Verify the exact `webdav_hostname` format required by your specific WebDAV server. Consult the server's documentation for pathing conventions. Experiment with including user-specific paths in the `webdav_hostname` or directly in method calls.
You may need to manually configure `requests` to use `HTTPDigestAuth` within the client's session, or switch the WebDAV server to use HTTP Basic Authentication if securely appropriate.
Avoid `client.verify = False` in production. Ensure your WebDAV server uses a valid, trusted SSL certificate. If using a custom CA, configure the `requests` session (accessed via `client.session`) to trust your certificate bundle.
Ensure the `auth` parameter when initializing `Client` uses the correct `(username, password)` tuple for the WebDAV server, and verify the user's access rights.
Verify the exact path of the file or directory on the WebDAV server, or use `client.exists(remote_path)` to check for its presence before attempting operations like download or delete.
Check the `base_url` for typos, ensure the WebDAV server is running and accessible, and verify network connectivity and firewall settings.
Replace `webdavclient` with `webdavclient3` in your import statements, as `webdavclient3` is the correct package name.