Async file io
Project description
aiopen
Install: pip install aiopen
Async-open
Why not use aiofiles?
- Wanted more type annotations
- aiofiles uses ye ole
@coroutine
decorator -- aiopen uses python3.6+async/await
- aiopen is a callable module, so you can do:
import aiopen
async with aiopen('afile.txt', 'w') as f: await f.write('some text!')
async with aiopen('afile.txt', 'r') as f: content = await f.read()
(Big shouts out to the aiofiles people, aiopen is entirely based off of aiofiles)
Usage:
Just import it! The module is also callable!
import aiopen
async with aiopen('afile.txt', 'w') as f:
await f.write('some text!')
async with aiopen('afile.txt', 'r') as f:
content = await f.read()
print(content)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
aiopen-0.7.0.tar.gz
(7.0 kB
view details)
Built Distribution
File details
Details for the file aiopen-0.7.0.tar.gz
.
File metadata
- Download URL: aiopen-0.7.0.tar.gz
- Upload date:
- Size: 7.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
92f424eb77c875580843592789b18a3a01cb609c49d5ff2e50d03e4a1fecaf94
|
|
MD5 |
e166c458cc42e0519ec7b0babbbd631b
|
|
BLAKE2b-256 |
299c7e3e57eadee1dcdacd5cb0a46dd4891e06ffbe18292a14e30ac52dfc85ac
|
File details
Details for the file aiopen-0.7.0-py2.py3-none-any.whl
.
File metadata
- Download URL: aiopen-0.7.0-py2.py3-none-any.whl
- Upload date:
- Size: 7.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
918e468176b34b32e39123e1ed30af0824df71bb549a6de837765b3376a4b9c1
|
|
MD5 |
d9c8ca2e3b8e9011648a529ee01108aa
|
|
BLAKE2b-256 |
317b6c57fd7c0d28ece7f0d60e8520632b830fec1611382a4e6c3e63e46e6886
|