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.2.tar.gz
(18.0 kB
view hashes)
Built Distributions
Close
Hashes for caio-0.5.2-cp38-cp38-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1926c5e65f279fe81346f5e75a65ef9557ee5b675dee2794d689cc6271b64470 |
|
MD5 | 23b8798e3271188fc4c121629e683ec6 |
|
BLAKE2b-256 | 3b18f86f8727fa99840e58f5404b63a698a555cc12eab35a2cdd8bc04f96aa7f |
Close
Hashes for caio-0.5.2-cp38-cp38-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b1d1549fd0c2126a030238d369562da7e66ad424e975c478e5f34b83563b235d |
|
MD5 | b9f00fe2adf9d9dca8e23d409e1eeef5 |
|
BLAKE2b-256 | e0f26ecf8f7be853c9b082fa18788f1feffec81286458f2e45dcba1fa8bc473a |
Close
Hashes for caio-0.5.2-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d2023ea49db7178fa9fd435121a5f476baf464fd2fa3cd32b76706c3c952e4c9 |
|
MD5 | 2917db7dabee425fc7c79224946a7107 |
|
BLAKE2b-256 | 0c368e9e1c47a7696c71d02a1cca2fc4807cabd0299194e81fb9fc3bc96bf7c3 |
Close
Hashes for caio-0.5.2-cp37-cp37m-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 814ae1c57c0fc6d93711daf5f964cc79cc89751beda9de7d9c51131d2dba237c |
|
MD5 | 5172afe9010fced7455001e321ca2637 |
|
BLAKE2b-256 | 79e799c937b22fc275275671b312c835d55d877ed47d8c3523b935f773e6cbe2 |
Close
Hashes for caio-0.5.2-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb0e0667137df8fe7b648434ffce3f8b8304d675d7c1722be62c04d98f3b0580 |
|
MD5 | 5b12b9fcdeabe6e5d5197d5c0a0c13c7 |
|
BLAKE2b-256 | 6921a0edf3c132edef429f00a187a484c33530ef20756de73a6c1faf0ab1e6ea |
Close
Hashes for caio-0.5.2-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a90c5fe08275ce958f4d226f88c1a48ff2901afcc13835a08bd3f36f098a92d |
|
MD5 | 23cc3cbbc70e03847d119d96f85db16f |
|
BLAKE2b-256 | de01753bb479ed4e6c8daad9d5e6fdf160706932b0ce17157995ba15180a72dc |
Close
Hashes for caio-0.5.2-cp36-cp36m-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1e1f09beba464da28b23b4eb1d3abaa4c1969d56be20c1169a90daafe23b669a |
|
MD5 | abfb8323dfe98b1b2af5f25a7090cd0d |
|
BLAKE2b-256 | b802ac7a971823cc40ec4c042417d1e0387922b2078adc436b602a7ab3a6ebc2 |
Close
Hashes for caio-0.5.2-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5adaa6ea80dab3f683bd13217c1ba56d968d01222ac57002a928a3b552a5e5d9 |
|
MD5 | 87a91a548273364d3ea717672f64b60f |
|
BLAKE2b-256 | 986a3d77d6740b506067083abedf47768679e4ad35448a6938b2ac308ac00ba4 |
Close
Hashes for caio-0.5.2-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 780b78a599aa0ee833ca4cc120601561e78dba9fc4c7ac301a5b41f3923007b1 |
|
MD5 | 986a3531870d4320b67d52a9e80fa384 |
|
BLAKE2b-256 | ff704f23f0f6dd2f014b1dc8a47f233f0e8523cb57e44ffbf86191c35ad53846 |
Close
Hashes for caio-0.5.2-cp35-cp35m-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7cd255ce916125ea72241ff02fd72c5220167eeb1d7c491990513bf868bca25f |
|
MD5 | 511f7dd3c9207b8aead3820a38eecf70 |
|
BLAKE2b-256 | 344502c81677fe80c65eb73c684f5aa03d8d1ebe7a36ae75651bfb50ae9e439a |
Close
Hashes for caio-0.5.2-cp35-cp35m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d728847a37aeeffb0d50fc35a2b836a0fe27e2cecaa3027f769e2717ff2be317 |
|
MD5 | 43cdceb18bd1cc09c7a69f7c2a3d086a |
|
BLAKE2b-256 | 7c010450b2cd92c87298bcca2d0172270668975f719209f09138626bf9448776 |
Close
Hashes for caio-0.5.2-cp35-cp35m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5883d299ad24f6d38730bae87bbd6f338856899a8e17cc467d934222fabb03d9 |
|
MD5 | b92dfb27581f28288c4293b7682dabc4 |
|
BLAKE2b-256 | edb646c97c03e13d8b5a21dc74db6e1b17effe1c4eb69a74405146459d620215 |