Registry / web-framework / wsgidav

wsgidav

JSON →
library4.3.4pypypi✓ verified 86d ago

WsgiDAV is a generic and extensible WebDAV server implementation based on WSGI. It allows access to file systems or other storage backends via HTTP, supporting features like locking, versioning, and properties. Currently at version 4.3.3, it receives frequent minor updates with a focus on stability and compatibility.

pip install wsgidav
INSTALL
IMPORT
SIG · WSGIDAV
W
wsgidav
web-frameworkpythonv4.3.4
Install
2.4s avg
Import
276ms
Disk
26MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v4.3.4 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.930 runs
installs and imports cleanly · install 0.0s · import 0.288s · 27.2MB
glibc
py 3.103.930 runs
installs and imports cleanly · install 2.4s · import 0.264s · 28MB
26MB installed
● package 26MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

WsgiDAVApp
from wsgidav.wsgidav_app import WsgiDAVApp
from wsgidav import WsgiDAVApp
The main WSGI application class was moved to a submodule in v4.0.0.
FileSystemProvider
from wsgidav.fs_dav_provider import FileSystemProvider
run_server
from wsgidav.server import run_server
from wsgidav.wsgidav_app import run_server
The server running utility was moved to its own submodule in v4.0.0.

This quickstart demonstrates how to set up a basic, anonymous WebDAV server serving a local directory using WsgiDAV programmatically. It creates a temporary directory and a sample file, then starts the server on `http://127.0.0.1:8080`. For production deployments, `WsgiDAVApp` should be integrated with a robust WSGI server like Gunicorn or uWSGI, and authentication should be configured.

import os from wsgidav.wsgidav_app import WsgiDAVApp from wsgidav.fs_dav_provider import FileSystemProvider from wsgidav.server import run_server # Create a temporary directory for the WebDAV root dav_root = os.path.join(os.getcwd(), 'my_webdav_root') os.makedirs(dav_root, exist_ok=True) # Create a simple file inside the root with open(os.path.join(dav_root, 'hello.txt'), 'w') as f: f.write('Hello, WebDAV!') config = { "host": "127.0.0.1", "port": 8080, "provider_mapping": { "/": FileSystemProvider(dav_root) }, "http_authenticator": { "domain_controller": None, # No authentication "accept_anonymous": True }, "verbose": 1, "dir_browser": { "enable": True, "remotefs": { "enable": True, "mount_url": "/", } } } print(f"Starting WsgiDAV server on http://{config['host']}:{config['port']}") print(f"Serving files from: {dav_root}") print("Open http://127.0.0.1:8080/ in your browser to test.") # Run the server. This is a blocking call. # For production, integrate WsgiDAVApp with a full WSGI server like Gunicorn or uWSGI. run_server(config)
wsgidav --version
Debug
Known issues
breakingWsgiDAV v4.0.0 introduced significant breaking changes, dropping Python 2 support and requiring Python 3.6+ (now 3.8+).
fix
Upgrade your Python environment to 3.8+. Review the v4.0.0 changelog for necessary code migrations, especially around configuration, imports, and authentication. Many internal modules were moved or renamed.
affects: <4.0.0
breakingThe configuration format changed significantly in v4.0.0, with many options renamed or restructured (e.g., `provider_mapping` to `roots` in some contexts, `verbose` to `debug_info`).
fix
If upgrading from pre-v4, re-write your `config` dictionary based on the v4 documentation and examples. Pay close attention to `provider_mapping`, `http_authenticator`, and `dir_browser` sections.
affects: <4.0.0
gotchaBy default, `wsgidav` expects a WSGI server to run it. While `wsgidav.server.run_server` provides a simple built-in server (Cheroot), it's not recommended for production.
fix
For production deployments, pass the `WsgiDAVApp` instance to a robust WSGI server like Gunicorn, uWSGI, or mod_wsgi. E.g., `gunicorn 'wsgidav.wsgidav_app:WsgiDAVApp(config)'` (adjusting config loading).
affects: All versions
deprecatedThe `wsgidav.dir_browser` module was deprecated and moved to `wsgidav.frontend.dir_browser` in v4.0.0.
fix
Update any direct imports or references to `wsgidav.dir_browser` to `wsgidav.frontend.dir_browser`.
affects: <4.0.0
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'wsgidav.dir_browser'
This import path was deprecated and moved in WsgiDAV v4.0.0.
fix
Update your import statement from `from wsgidav import dir_browser` or similar to `from wsgidav.frontend import dir_browser`.
TypeError: WsgiDAVApp() got an unexpected keyword argument 'verbose'
Configuration option names changed in v4.0.0.
fix
The `verbose` option was renamed. Replace `verbose` with `debug_info` in your configuration dictionary (e.g., `"debug_info": True`). Refer to the v4 documentation for current configuration options.
FileNotFoundError: [Errno 2] No such file or directory: 'some_path'
This typically occurs when `FileSystemProvider` is configured with a path that doesn't exist or isn't accessible to the WsgiDAV process.
fix
Ensure the directory specified for `FileSystemProvider` (e.g., in `provider_mapping`) exists and the user running WsgiDAV has read/write permissions to it. Create the directory if it's missing.
Upgrade
Version history
4.3.4latest on PyPI · released May 24, 2026
Audit
Dependencies
cherootoptionalDefault and recommended WSGI server for WsgiDAV.
pyyamloptionalRequired for loading configuration from YAML files.
Agent activity
33 hits · last 30 days
node
27
OpenAI (training)
1
Resources
wsgidav — pip install wsgidav · libregistry