Skip to content

Commit 86ec2f0

Browse files
Merge pull request #7 from Quansight/improve_readme
improves readme and examples
2 parents f02adb1 + 0cade42 commit 86ec2f0

File tree

2 files changed

+126
-108
lines changed

2 files changed

+126
-108
lines changed

README.md

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,46 @@
1+
==================
12
Universal Pathlib
23
==================
34

45
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)
56

67
Installation
7-
-------------
8+
=============
89

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+
------
1019

1120
```bash
1221
conda install -c conda-forge universal_pathlib
1322
```
1423

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)
44+
45+
46+

0 commit comments

Comments
 (0)