Metadata-Version: 2.1
Name: webdav4
Version: 0.9.8
Summary: WebDAV client library with an fsspec-based filesystem and a CLI
Project-URL: Bug Tracker, https://github.com/skshetry/webdav4/issues
Project-URL: Documentation, https://skshetry.github.io/webdav4
Project-URL: Source Code, https://github.com/skshetry/webdav4
Author-email: Saugat Pachhai <suagatchhetri@outlook.com>
License-File: LICENSE
Keywords: fsspec,webdav,webdav-cli,webdav-client
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Python: >=3.7
Requires-Dist: httpx<1.0.0,>=0.20
Requires-Dist: python-dateutil>=2.8.1
Provides-Extra: all
Requires-Dist: webdav4[fsspec,http2]; extra == 'all'
Provides-Extra: dev
Requires-Dist: webdav4[docs,fsspec,http2,qa,tests]; extra == 'dev'
Provides-Extra: docs
Requires-Dist: furo==2022.9.29; extra == 'docs'
Requires-Dist: myst-parser==0.18.1; extra == 'docs'
Requires-Dist: sphinx-copybutton==0.5; extra == 'docs'
Requires-Dist: sphinx==5.3; extra == 'docs'
Provides-Extra: fsspec
Requires-Dist: fsspec>=2021.7; extra == 'fsspec'
Provides-Extra: http2
Requires-Dist: httpx[http2]<1.0.0,>=0.20; extra == 'http2'
Provides-Extra: qa
Requires-Dist: mypy==0.982; extra == 'qa'
Requires-Dist: pre-commit; extra == 'qa'
Requires-Dist: pylint-pytest==1.1.2; extra == 'qa'
Requires-Dist: pylint==2.15.5; extra == 'qa'
Requires-Dist: types-pkg-resources; extra == 'qa'
Requires-Dist: types-python-dateutil; extra == 'qa'
Provides-Extra: tests
Requires-Dist: cheroot; extra == 'tests'
Requires-Dist: colorama; extra == 'tests'
Requires-Dist: pytest; extra == 'tests'
Requires-Dist: pytest-cov; extra == 'tests'
Requires-Dist: pytest-xdist; extra == 'tests'
Requires-Dist: typing-extensions; extra == 'tests'
Requires-Dist: wsgidav; extra == 'tests'
Description-Content-Type: text/markdown

# webdav4

[![Project Status: WIP – Initial development is in progress, but there has not yet been a stable, usable release suitable for the public.](https://www.repostatus.org/badges/latest/wip.svg)](https://www.repostatus.org/#wip)
[![Conda](https://anaconda.org/conda-forge/webdav4/badges/version.svg)](https://anaconda.org/conda-forge/webdav4)
[![PyPi](https://img.shields.io/pypi/v/webdav4.svg)](https://pypi.org/project/webdav4)
![ci](https://github.com/skshetry/webdav4/workflows/CI/badge.svg)
[![codecov](https://codecov.io/gh/skshetry/webdav4/branch/main/graph/badge.svg)](https://codecov.io/gh/skshetry/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.
![cli-usage](docs/_static/usage.png)

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.
