Skip to content

Commit

Permalink
Merge branch 'main' of github.com:alexdelorenzo/aiopath into main
Browse files Browse the repository at this point in the history
  • Loading branch information
alexdelorenzo committed Mar 8, 2021
2 parents 3e03f55 + e76969f commit 05f0a21
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# 📁 Async pathlib for Python
`aiopath` is a complete implementation of [`pathlib`](https://docs.python.org/3/library/pathlib.html) from Python 3.4+ that is compatible with [`asyncio`](https://docs.python.org/3/library/asyncio.html) and the [`async/await` syntax](https://www.python.org/dev/peps/pep-0492/). All I/O performed is asynchronous and [awaitable](https://docs.python.org/3/library/asyncio-task.html#awaitables).

This library will take advantage of [libaio](https://pagure.io/libaio) on Linux.
`aiopath` is extensively typed with Python [type annotations](https://docs.python.org/3/library/typing.html). `aiopath` also takes advantage of [libaio](https://pagure.io/libaio) on Linux.

## Usage
`aiopath.Path` has the same API as `pathlib.Path`, and `aiopath.AsyncPurePath` works the same way as `pathlib.PurePath`. The only difference is that with `aiopath`, methods that perform I/O are asynchronous and awaitable, and methods that returned iterators now return [async generators](https://www.python.org/dev/peps/pep-0525/).
Expand Down Expand Up @@ -55,8 +55,8 @@ from aiopath import AsyncPath
home: Path = Path.home()
ahome: AsyncPath = AsyncPath(home)

assert isinstance(path, Path)
assert isinstance(apath, AsyncPath)
assert isinstance(home, Path)
assert isinstance(ahome, AsyncPath)
```

### Opening a file
Expand Down Expand Up @@ -107,13 +107,6 @@ if await downloads.exists():
- Python 3.7+
- `requirements.txt`

### Linux
This library will take advantage of [libaio](https://pagure.io/libaio), which is compatible with Linux 4.18 and up.

```bash
sudo apt install libaio1
```

## PyPI
```bash
$ python3 -m pip install aiopath
Expand All @@ -125,6 +118,13 @@ $ python3 -m pip install -r requirements.txt
$ python3 setup.py install
```

### Linux
This library will take advantage of [libaio](https://pagure.io/libaio), which is compatible with Linux 4.18 and up.

```bash
sudo apt install libaio1
```

# Support
Want to support more open-source software like this?

Expand Down

0 comments on commit 05f0a21

Please sign in to comment.