Skip to content

Commit f551c59

Browse files
authored
Adds WebdavPath (#60)
* refactors _FSSpecAccessor to have explicit method passing * unify GCSPath and S3Path implementations * adds WebdavPath * other port * add webdav4 to noxfile * windows? * pr feedback * add schemes to readme * examples * examples * examples
1 parent 9c4432b commit f551c59

File tree

10 files changed

+511
-275
lines changed

10 files changed

+511
-275
lines changed

README.md

Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,36 @@ conda install -c conda-forge universal_pathlib
2020

2121
```python
2222
>>> from upath import UPath
23-
24-
>>> path = UPath("file:/some/filepath.py")
25-
>>> path.name
26-
filepath.py
27-
>>> path.stem
28-
filepath
29-
>>> path.suffix
30-
.py
31-
>>> path.exists()
23+
>>> import s3fs
24+
25+
>>> s3path = UPath("s3://test_bucket") / "example.txt"
26+
>>> s3path.name
27+
example.txt
28+
>>> s3path.stem
29+
example
30+
>>> s3path.suffix
31+
.txt
32+
>>> s3path.exists()
3233
True
34+
>>> s3path.read_text()
35+
'Hello World'
3336
```
3437

35-
Some backends may require other dependencies. For example to work with S3 paths, [`s3fs`](https://s3fs.readthedocs.io/en/latest/) is required.
36-
3738
For more examples, see the [example notebook here](notebooks/examples.ipynb)
3839

40+
### Currently supported filesystems (and schemes)
41+
42+
- `file:` Local filessystem
43+
- `memory:` Ephemeral filesystem in RAM
44+
- `http:` and `https:` HTTP(S)-based filesystem
45+
- `hdfs:` Hadoop distributed filesystem
46+
- `gs:` and `gcs:` Google Cloud Storage (requires `gcsfs` to be installed)
47+
- `s3:` and `s3a:` AWS S3 (requires `s3fs` to be installed)
48+
- `webdav+http:` and `webdav+https:` WebDAV-based filesystem on top of HTTP(S) (requires `webdav4[fsspec]` to be installed)
49+
50+
Other fsspec-compatible filesystems may also work, but are not supported and tested.
51+
Contributions for new filesystems are welcome!
3952

53+
## License
4054

55+
MIT License

0 commit comments

Comments
 (0)