webdav40.10.0
Published
WebDAV client library with an fsspec-based filesystem and a CLI
pip install webdav4
Package Downloads
Authors
Project URLs
Requires Python
>=3.8
Dependencies
- httpx
<1,>=0.20
- python-dateutil
>=2.8.1
- fsspec
>=2021.7; extra == "all"
- httpx
[http2]<1,>=0.20; extra == "all"
- cheroot
; extra == "dev"
- colorama
; extra == "dev"
- fsspec
>=2021.7; extra == "dev"
- furo
==2024.5.6; extra == "dev"
- httpx
[http2]<1,>=0.20; extra == "dev"
- mypy
==1.10.1; extra == "dev"
- myst-parser
<4,>=3; extra == "dev"
- pre-commit
; extra == "dev"
- pytest
; extra == "dev"
- pytest-cov
; extra == "dev"
- pytest-xdist
; extra == "dev"
- sphinx-copybutton
==0.5.2; extra == "dev"
- sphinx
<8,>=7; extra == "dev"
- types-colorama
; extra == "dev"
- types-pkg-resources
; extra == "dev"
- types-python-dateutil
; extra == "dev"
- typing-extensions
; extra == "dev"
- wsgidav
; extra == "dev"
- furo
==2024.5.6; extra == "docs"
- myst-parser
<4,>=3; extra == "docs"
- sphinx-copybutton
==0.5.2; extra == "docs"
- sphinx
<8,>=7; extra == "docs"
- fsspec
>=2021.7; extra == "fsspec"
- httpx
[http2]<1,>=0.20; extra == "http2"
- mypy
==1.10.1; extra == "qa"
- pre-commit
; extra == "qa"
- types-colorama
; extra == "qa"
- types-pkg-resources
; extra == "qa"
- types-python-dateutil
; extra == "qa"
- cheroot
; extra == "tests"
- colorama
; extra == "tests"
- pytest
; extra == "tests"
- pytest-cov
; extra == "tests"
- pytest-xdist
; extra == "tests"
- typing-extensions
; extra == "tests"
- wsgidav
; extra == "tests"
webdav4
Webdav API with an (optional) fsspec implementation and a CLI.
Installation
$ pip install webdav4
Usage
webdav4 Client
from webdav4.client import Client
client = Client("https://webdav.com", auth=("username", "password"))
client.exists("Documents/Readme.md")
client.ls("Photos", detail=False)
client.upload_file("Gorilla.jpg", "Photos/Gorilla.jpg")
Check out Client API reference for more information.
fsspec
fsspec
tries to provide a
consistent APIs to different storage backends, by defining standard
interfaces, so that other code using them could operate without depending
on the implementations of the backends. This package, in the same way,
wraps the above webdav client with a consistent file-system API.
To use it, you need to install fsspec
additionally which you can do as
follows:
$ pip install webdav4[fsspec]
from webdav4.fsspec import WebdavFileSystem
fs = WebdavFileSystem("https://webdav.com", auth=("username", "password"))
fs.exists("Documents/Readme.md")
fs.ls("Photos", detail=False)
Check out WebdavFileSystem API reference for more information.
CLI
webdav4 also provides a CLI similar to aws s3
to make it easier to work with webdav servers.
Please checkout CLI Usage for more information.
Contributing
Contributions are welcome. Please take a look at Contributing Guide for more details.