Real asynchronous file operations with asyncio support.
Status
Development - BETA
Features
Code examples
Totally async read and write:
import asyncio
from aiofile import AIOFile, Reader, Writer
async def main(loop):
aio_file = AIOFile("/tmp/hello.txt", 'w+', loop=loop)
await aio_file.write(b"Hello ")
await aio_file.write(b"world", offset=7)
await aio_file.fsync()
print(await aio_file.read())
loop = asyncio.get_event_loop()
loop.run_until_complete(main(loop))
Write and read with helpers:
import asyncio
from aiofile import AIOFile, Reader, Writer
async def main(loop):
aio_file = AIOFile("/tmp/hello.txt", 'w+', loop=loop)
writer = Writer(aio_file)
reader = Reader(aio_file, chunk_size=8)
await writer(b"Hello")
await writer(b" ")
await writer(b"World")
await aio_file.flush()
async for chunk in reader:
print(chunk)
loop = asyncio.get_event_loop()
loop.run_until_complete(main(loop))
Metadata
Release files for aiofile 0.5.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| aiofile-0.5.3.tar.gz | 72.2 kB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| aiofile-0.5.3-cp36-cp36m-manylinux1_x86_64.whl | CPython 3.6 | CPython 3.6 pymalloc | Linux glibc 2.5+ x86-64 | Details |
| aiofile-0.5.3-cp36-cp36m-macosx_10_6_intel.whl | CPython 3.6 | CPython 3.6 pymalloc | macOS 10.6+ Intel (x86-64, i386) | Details |
| aiofile-0.5.3-cp35-cp35m-manylinux1_x86_64.whl | CPython 3.5 | CPython 3.5 pymalloc | Linux glibc 2.5+ x86-64 | Details |
| aiofile-0.5.3-cp35-cp35m-macosx_10_6_intel.whl | CPython 3.5 | CPython 3.5 pymalloc | macOS 10.6+ Intel (x86-64, i386) | Details |
| aiofile-0.5.3-cp34-cp34m-manylinux1_x86_64.whl | CPython 3.4 | CPython 3.4 pymalloc | Linux glibc 2.5+ x86-64 | Details |
| aiofile-0.5.3-cp34-cp34m-macosx_10_6_intel.whl | CPython 3.4 | CPython 3.4 pymalloc | macOS 10.6+ Intel (x86-64, i386) | Details |
Total release size: 922.0 kB
Release files / aiofile-0.5.3.tar.gz
| Download URL | aiofile-0.5.3.tar.gz |
|---|---|
| Size | 72.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2a37d2e5e42ec11803b31a8939077d39159a7863b48b43dffc4453962db3b61e
|
|
BLAKE2b-256 checksum How to use checksums |
8e2ca2c8029c4f80eea2c20317321918abaab7744daf20622a52cd39512440e4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / aiofile-0.5.3-cp36-cp36m-manylinux1_x86_64.whl
| Download URL | aiofile-0.5.3-cp36-cp36m-manylinux1_x86_64.whl |
|---|---|
| Size | 188.2 kB |
| Tags | CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.5+ x86-64 |
|
SHA-256 checksum How to use checksums |
0e05e29374a4274606b9cf595012dfe31256705f5330574e9478d3426283aa75
|
|
BLAKE2b-256 checksum How to use checksums |
f5e1a0d1f500605f3d960f6505c3444a11f8f751242f2abbcfe4288ba6f3b409
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / aiofile-0.5.3-cp36-cp36m-macosx_10_6_intel.whl
| Download URL | aiofile-0.5.3-cp36-cp36m-macosx_10_6_intel.whl |
|---|---|
| Size | 93.6 kB |
| Tags | CPython 3.6 CPython 3.6 pymalloc macOS 10.6+ Intel (x86-64, i386) |
|
SHA-256 checksum How to use checksums |
1bdbf3cd07249f8b5a5cb3d1346bbdce6817e70066b57618f6723f7ee8fd699a
|
|
BLAKE2b-256 checksum How to use checksums |
c7e057f0347f4d6f227c5db12fee6aeb024d280bce9e4b50a8fbee8a515f8225
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / aiofile-0.5.3-cp35-cp35m-manylinux1_x86_64.whl
| Download URL | aiofile-0.5.3-cp35-cp35m-manylinux1_x86_64.whl |
|---|---|
| Size | 185.1 kB |
| Tags | CPython 3.5 CPython 3.5 pymalloc Linux glibc 2.5+ x86-64 |
|
SHA-256 checksum How to use checksums |
285defdecd84305c62c67c7234449a2a03666b347e952cf5f1c6a532376fe266
|
|
BLAKE2b-256 checksum How to use checksums |
4f7eb7f6c516402a6044a62d7a837b9573fc8d86da4891d7b31e6de3ab667cba
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / aiofile-0.5.3-cp35-cp35m-macosx_10_6_intel.whl
| Download URL | aiofile-0.5.3-cp35-cp35m-macosx_10_6_intel.whl |
|---|---|
| Size | 94.9 kB |
| Tags | CPython 3.5 CPython 3.5 pymalloc macOS 10.6+ Intel (x86-64, i386) |
|
SHA-256 checksum How to use checksums |
163e64be51e38c3b3282da180c201205a4e734f9f8f8d7fe767887459cc64704
|
|
BLAKE2b-256 checksum How to use checksums |
337dc5dd8b85467cee10f839cd6b926b23b8c2ff35945a0c12f92891af8ac97f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / aiofile-0.5.3-cp34-cp34m-manylinux1_x86_64.whl
| Download URL | aiofile-0.5.3-cp34-cp34m-manylinux1_x86_64.whl |
|---|---|
| Size | 191.5 kB |
| Tags | CPython 3.4 CPython 3.4 pymalloc Linux glibc 2.5+ x86-64 |
|
SHA-256 checksum How to use checksums |
c48da5ef555347aa2f438c47310463906457a51a6c44b6ea547d62d07003988b
|
|
BLAKE2b-256 checksum How to use checksums |
c9ce6793d0f19a8e64f684ec4eaf0943f0132c437a70c88325b3bbd393920cdc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / aiofile-0.5.3-cp34-cp34m-macosx_10_6_intel.whl
| Download URL | aiofile-0.5.3-cp34-cp34m-macosx_10_6_intel.whl |
|---|---|
| Size | 96.4 kB |
| Tags | CPython 3.4 CPython 3.4 pymalloc macOS 10.6+ Intel (x86-64, i386) |
|
SHA-256 checksum How to use checksums |
1e86f828437745ba403c9bf376b30d88c8e3f71eb0d115a159e8c12004204197
|
|
BLAKE2b-256 checksum How to use checksums |
b9d4b6e52290e21ba393be059bbb0daa4b6a89f852b44216b2d86af13a94d6ea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |