Asynchronous file IO for Linux Posix and Windows.
Project description
Python bindings for Linux AIO API and simple asyncio wrapper.
Example
import asyncio
from caio import AsyncioContext
loop = asyncio.get_event_loop()
async def main():
# max_requests=128 by default
ctx = AsyncioContext(max_requests=128)
with open("test.file", "wb+") as fp:
fd = fp.fileno()
# Execute one write operation
await ctx.write(b"Hello world", fd, offset=0)
# Execute one read operation
print(await ctx.read(32, fd, offset=0))
# Execute one fdsync operation
await ctx.fdsync(fd)
op1 = ctx.write(b"Hello from ", fd, offset=0)
op2 = ctx.write(b"async world", fd, offset=11)
await asyncio.gather(op1, op2)
print(await ctx.read(32, fd, offset=0))
# Hello from async world
loop.run_until_complete(main())
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
caio-0.6.3.tar.gz
(16.8 kB
view hashes)
Built Distributions
Close
Hashes for caio-0.6.3-cp39-cp39-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 021f58a8fece4760dc031eb817a7586c91e82ea593c1d2c70369baf76c4b53ad |
|
MD5 | d6169f799b16340a183988993cf8e635 |
|
BLAKE2b-256 | 8f1f10fce1cf2d33849dc3f3eb934dc18a903740f1f03d7e6e924f07e09ca99a |
Close
Hashes for caio-0.6.3-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 45b607a9d029e6168257ee24d36c0ce594d9d4051f0ca34b7cc580d0056ce4cf |
|
MD5 | 48907a29ce9ed19a6eb6da6fc3d303e0 |
|
BLAKE2b-256 | 8cc2af0ecb87a3c3d5a17124fcaf2dc973f4f2b72b4e1010d1c6ca67dc7fcae3 |
Close
Hashes for caio-0.6.3-cp38-cp38-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1b939a522a859db442cf8a90eb7159a19db4431d319855168c90444398af65aa |
|
MD5 | 77a0d6e6730139c3f088153c38dcf1a2 |
|
BLAKE2b-256 | e66918d041532f0261ec0f08d62cf4e202a571ab952b14f5ddcd481e6b6dc88f |
Close
Hashes for caio-0.6.3-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 44b822d0cfa8ac4a1b62a124306d104bd7088069ffce007846541bd77ba0bae5 |
|
MD5 | bebb1864cafb99e27868ba3eaf12ffc3 |
|
BLAKE2b-256 | 6eedd7fdac786f476990b6674a972ecbeb1bcf8e163b8cc7a190e37ca609d6c0 |
Close
Hashes for caio-0.6.3-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b25ad180c8f2a3c11b630e1bc4235931cc09d7754c9a8c8d9926af6ec9ad3e3a |
|
MD5 | 9d996e5bbba3ef803e8dd8db04e248c7 |
|
BLAKE2b-256 | 72ad5a3ed8eeb50cf74ba4393d946745343d50681b4e06fcf2a3b929549a73c1 |
Close
Hashes for caio-0.6.3-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ab5fed3ef626c38fc7783e03557040712182fea483aa8037fe13bd886a592545 |
|
MD5 | 004a4208cec47338d73e184116e8a66b |
|
BLAKE2b-256 | a06de35972e424b27ac62617eb9d1608e7aa1593e4e0978c1c888779e198ed4f |
Close
Hashes for caio-0.6.3-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8a364cc86e9d1942354327d5a635136280a8150c5e0dc5bc38a08acd57442f9c |
|
MD5 | 479aea2e6a1fb466f23cae248be3fe8e |
|
BLAKE2b-256 | 33cfcd631198b71b9b6375ccca13f6de640ae4dc14b127e71be33db2b8ecb6ba |
Close
Hashes for caio-0.6.3-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 912d4bd328fb85d48e9c784c784f5a79deed558ffc4b4c3e144886ca9a560aba |
|
MD5 | 75daf6b752cece9f58fafcc6aac533e0 |
|
BLAKE2b-256 | ed2a032d8aa4c9a3d0ba089bc66557ab2813ea42b6b63f025d44106c90c4ad53 |
Close
Hashes for caio-0.6.3-cp35-cp35m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 215fc6c7d8535282da4fc5180886e44ef7d76b0d568f77576b092ed0fcb00434 |
|
MD5 | 316280c9874d410d09a97a057d850377 |
|
BLAKE2b-256 | 11986c24a7299ef3e801a64c3681df22b373a5a19958ff902f53e615edcbcf80 |
Close
Hashes for caio-0.6.3-cp35-cp35m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b12915f20630d8b67b5b0c1747bc62f9aac285859a63d84f79bd2973973644f8 |
|
MD5 | 2f7e6cac38c183920dfe815a34e286b1 |
|
BLAKE2b-256 | 44e9590c23379f61f08769ddb255d47e9be87664ae487bc51958f324eeba770d |