Asynchronous file IO for Linux Posix and Wondows.
Project description
Python bindings for Linux AIO API and simple asyncio wrapper.
Example
import asyncio
from linux_aio import AsyncioAIOContext
loop = asyncio.get_event_loop()
async def main():
# max_requests=128 by default
ctx = AsyncioAIOContext(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.5.3.tar.gz
(18.0 kB
view hashes)
Built Distributions
Close
Hashes for caio-0.5.3-cp38-cp38-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 197fab08573235f8a7acb0fc09971e331d5354cf6b8be6ade8308a6aabef7da5 |
|
MD5 | ccf1e6cf7630bc37e360f71be17a2b5d |
|
BLAKE2b-256 | 516905505135963194d3df9491b983a788099f6c4a64de053a1072456ea0fce8 |
Close
Hashes for caio-0.5.3-cp38-cp38-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2dbdc306e991fb051dd5acb3ccceda360acd3bedf0f0ff7e662b736af9c82523 |
|
MD5 | 15847dd3e48b43e70dcce0b13d56ac91 |
|
BLAKE2b-256 | e7fba0d84fac37dd8a6050dc75378a1ea86813daa66475d238fe4247fd9efe70 |
Close
Hashes for caio-0.5.3-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 393bc1d08778d8288fbe3fdef794a672807e3853f97d08b66ee9b3728c6aad36 |
|
MD5 | 4ab49833594bcc719836dc9dd24da076 |
|
BLAKE2b-256 | e4deb7824124d512d2e8cdb13f006421fa3053636ff7b2dac83247f08e0da457 |
Close
Hashes for caio-0.5.3-cp37-cp37m-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e4237bc513ba16b748068e364a258b1000c8d9155f58ef862314937b5ff47b1b |
|
MD5 | 9e60fee2373408ba83e7040e2842ec1a |
|
BLAKE2b-256 | acbd0f77dfe58088749ec0c4866db01db052d8973290755411990834fce25c3b |
Close
Hashes for caio-0.5.3-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 71aebb2fdd604f0c5b7e751a70013109dffde74c8a2bff6d25d8b0a09904a5fb |
|
MD5 | 7ca22864e51fec0381075d819cc0a2c9 |
|
BLAKE2b-256 | f4bccef101bfb0a94984532d2a7bb68a4854b48a48391556abb6e01b71287582 |
Close
Hashes for caio-0.5.3-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 556253f87a69575d1712367c3c9ddef0e914ed5dc45403a230c7efbab9fee9ce |
|
MD5 | 196c566c52a969656bce28e0c218f44a |
|
BLAKE2b-256 | 04cb1b138d44307f2e1f1b8ccf0a7712d44af679a1eaac1d72e99bed0470fba0 |
Close
Hashes for caio-0.5.3-cp36-cp36m-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dbf0fcbf0cbc73a44ed8f0f70be15856402ee9bae6986a5494c2e0f3953b2b7f |
|
MD5 | 865f22ea780fda1203c2769131189f3c |
|
BLAKE2b-256 | e6e151e8584963a8abb372974a8db78055e4b502f2e7e31d62c015208869a470 |
Close
Hashes for caio-0.5.3-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 68b2c8529b7d4625fe913317206803ab15c067fd5c4812bb11f7edbb236d0b2c |
|
MD5 | c70509a1ca738d1bccaaadfd71f6df07 |
|
BLAKE2b-256 | 7dd6b298d4416b2ada837b3f33d77e0d17fe44a0b6a3b2e0c0998ef8a05f525d |
Close
Hashes for caio-0.5.3-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3db58364561f5a778a72a679794c4c0538d4fdb010c7c373c87f0d66b94b1b84 |
|
MD5 | b93a39d40de7c2b626146df528eb8c40 |
|
BLAKE2b-256 | 65863c164048e7be69cfe3a7eb87e238f81cca0397d4943b62c2f2f68d768fb8 |
Close
Hashes for caio-0.5.3-cp35-cp35m-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 24e036edcaf4149020ea2d6ed78c1ac855a00158980fdd281ac51947d3f4c6eb |
|
MD5 | b066cabde599b83579ba4c37d1821d17 |
|
BLAKE2b-256 | 9a1809e4f335cb36e9ae442fa33b8f9e353b395bd08bdf2666d9956ce54d5b3f |
Close
Hashes for caio-0.5.3-cp35-cp35m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 954ac149ff3cc7b2904e66ccd3e9015429f1ecdf91029bb20324ab493ae0a495 |
|
MD5 | 95c072a9f7cc257910a6ad3de5178b7a |
|
BLAKE2b-256 | f219b63a50ae8adfe50f9bc13af31f555b798eaafa13ff80e3bacef74f09747e |
Close
Hashes for caio-0.5.3-cp35-cp35m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 81274d37b2098276122a09880a8cc770caa6dff1e1a996dbd34583e47f259018 |
|
MD5 | dd973f122b3ea409b9b5f1aa550d3f28 |
|
BLAKE2b-256 | 3e9eefd36e4624775e5aabf960cfd8672b31959bc90eb7cf26da9d4c82091996 |