https://github.com/skshetry/webdav4
WebDAV client library with a fsspec based filesystem and a CLI.
https://github.com/skshetry/webdav4
fsspec webdav webdav-cli webdav-client
Last synced: about 1 year ago
JSON representation
WebDAV client library with a fsspec based filesystem and a CLI.
- Host: GitHub
- URL: https://github.com/skshetry/webdav4
- Owner: skshetry
- License: mit
- Created: 2021-02-06T13:26:43.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2024-08-26T14:00:22.000Z (almost 2 years ago)
- Last Synced: 2024-10-11T10:30:32.072Z (over 1 year ago)
- Topics: fsspec, webdav, webdav-cli, webdav-client
- Language: Python
- Homepage: https://skshetry.github.io/webdav4
- Size: 47.2 MB
- Stars: 63
- Watchers: 5
- Forks: 17
- Open Issues: 19
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# webdav4
[](https://pypi.org/project/webdav4)
[](https://anaconda.org/conda-forge/webdav4)
[](https://pypi.org/project/webdav4)
[](https://pypi.org/project/webdav4)

Webdav API with an (optional) [fsspec](#fsspec) implementation and a [CLI](#cli).
## Installation
```console
$ pip install webdav4
```
### Usage
#### webdav4 Client
```python
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](docs/reference/client.md) reference for more information.
#### fsspec
[`fsspec`](https://filesystem-spec.readthedocs.io) 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](#webdav4-client) with a consistent file-system API.
To use it, you need to install `fsspec` additionally which you can do as
follows:
```console
$ pip install webdav4[fsspec]
```
```python
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](docs/reference/fsspec.md) 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](docs/reference/cli.md) for more information.
### Contributing
Contributions are welcome. Please take a look at
[Contributing Guide](CONTRIBUTING.md) for more details.