You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Universal Pathlib is a python library that aims to extend Python's built-in [`pathlib.Path`](https://docs.python.org/3/library/pathlib.html) api to use a variety of backend filesystems using [`fsspec`](https://filesystem-spec.readthedocs.io/en/latest/intro.html)
5
6
6
7
Installation
7
-
-------------
8
+
=============
8
9
9
-
Universal Pathlib can be installs from conda-forge via:
10
+
Pypi
11
+
-----
12
+
13
+
```bash
14
+
pip install universal-pathlib
15
+
```
16
+
17
+
conda
18
+
------
10
19
11
20
```bash
12
21
conda install -c conda-forge universal_pathlib
13
22
```
14
23
24
+
Basic Usage
25
+
============
26
+
27
+
```python
28
+
>>>from upath import UPath
29
+
30
+
>>> path = UPath(file:/some/filepath.py)
31
+
>>> path.name
32
+
filepath.py
33
+
>>> path.stem
34
+
filepath
35
+
>>> path.suffix
36
+
.py
37
+
>>> path.exists()
38
+
True
39
+
```
40
+
41
+
Some backends may require other dependencies. For example to work with S3 paths, [`s3fs`](https://s3fs.readthedocs.io/en/latest/) is required.
42
+
43
+
For more examples, see the [example notebook here](notebooks/example.ipynb)
0 commit comments