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.5.5.tar.gz
(16.6 kB
view hashes)
Built Distributions
Close
Hashes for caio-0.5.5-cp38-cp38-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b2741962549fceb8d4c856f90a99eb865d3514cfdd2878e776e8ab88daf86a3d |
|
MD5 | 0fede145619c55e1e9b1956d646ac206 |
|
BLAKE2b-256 | 15b6d926bc27d3046ebbc57dfa643dbdd3e4bab6186887738faa216c2b38f05c |
Close
Hashes for caio-0.5.5-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b5e1b7a26fa02837a7f0be84375fea08a43257a291e797b21897bf0aeeb3152 |
|
MD5 | e1d7287b730a511c6308ab011069684d |
|
BLAKE2b-256 | a70e3a360c5de26d83ed91241d08867f84bfafb86b3d8d6857ddd10cf47d9106 |
Close
Hashes for caio-0.5.5-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 733942025b4aaab9da72dac556fd291cb173034aa18e4e7758f0bf5bfbca6a54 |
|
MD5 | d8efbc1325f7477d525a139c2cde885b |
|
BLAKE2b-256 | 30804d0acb01c3a9fabf4c6d70f1edc4297bcd80538859abea92c74ea49ed708 |
Close
Hashes for caio-0.5.5-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 514c7c73305d36b449043b85d4f0583dd7a92c84e722b49a79c5aca1bd3d0c8e |
|
MD5 | 50a82344af21a7ae373cda8b84da86a1 |
|
BLAKE2b-256 | 629cd14379ece1bb8f5c872c3a5e9464a8bb206381557d4a022182e235b2ea0b |
Close
Hashes for caio-0.5.5-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 934e5d2ee4970792656e1899277c3df8586a57babf3e9e4072edaec0d28b904e |
|
MD5 | 6c14e3774f436f6ed0571bb12440d905 |
|
BLAKE2b-256 | 41f24739a80386a49aec47d0ededa6b15c8ba72c96820ab92463ca02ffc2f6d0 |
Close
Hashes for caio-0.5.5-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1e652c6d202332457ef68c47f9eeaf34d545d52a8566623c5ba0bf84732dd8ba |
|
MD5 | e8647f364594c2a298919d0d2c82ca68 |
|
BLAKE2b-256 | 2fb7b27d24fc7f22ac5c221faba55770cd6b755ea9ef7176f1766544042772d6 |
Close
Hashes for caio-0.5.5-cp35-cp35m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 29f5864ea351872fb85de800cc84cf135390b6c7ac29f6da0f3a8301eb3960ce |
|
MD5 | 41c02e670b94e01fea2f5fe8997dbccf |
|
BLAKE2b-256 | b2ede952d8a4001b3d1787bb36f154b03a69e3c88c7cfa0dd6e02d941b90d6ce |
Close
Hashes for caio-0.5.5-cp35-cp35m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1a9f56b311c0e76fa8709ea85db6d664e3fcf6e9e63507101c7654eacd078217 |
|
MD5 | 9db6254d1720f35bc162c3380b35ce14 |
|
BLAKE2b-256 | d187ca86ea76093c99dcd4835193d1da7e40cff5facdf139872de7030153722a |