Asynchronous file IO for Linux MacOS or 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())
Troubleshooting
The linux implementation works normal for modern linux kernel versions and file systems. So you may have problems specific for your environment. It’s not a bug and might be resolved some ways:
Upgrade the kernel
Use compatible file system
Use threads based or pure python implementation.
The caio since version 0.7.0 contains some ways to do this.
1. In runtime use the environment variable CAIO_IMPL with possible values:
linux - use native linux kernels aio mechanism
thread - use thread based implementation written in C
python - use pure python implementation
2. File default_implementation located near __init__.py in caio installation path. It’s useful for distros package maintainers. This file might contains comments (lines starts with # symbol) and the first line should be one of linux thread or python.
Previous versions allows direct import of the target implementation.
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
Built Distributions
File details
Details for the file caio-0.9.12.tar.gz
.
File metadata
- Download URL: caio-0.9.12.tar.gz
- Upload date:
- Size: 24.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d2be553738dd793f8a01a60316f2c5284fbf152219241c0c67ca05f650a37a37 |
|
MD5 | 189839b32d864372af2134673896ff19 |
|
BLAKE2b-256 | 3269b1f5ae37edc6877425abd2acccb654417e43240650f016bb5a9abe4e49c3 |
File details
Details for the file caio-0.9.12-py3-none-any.whl
.
File metadata
- Download URL: caio-0.9.12-py3-none-any.whl
- Upload date:
- Size: 19.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b81b3271478e91f18e7ac1f3e4f914ba0924364857ba8e27f03b9d0aea915ca8 |
|
MD5 | 08611a5209656fedd3f1f6fc335cda4e |
|
BLAKE2b-256 | 9ce215a484546f3a7e8c74e80e4292b97fa7466e6618ffb892239feea08b2036 |
File details
Details for the file caio-0.9.12-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
.
File metadata
- Download URL: caio-0.9.12-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 79.9 kB
- Tags: CPython 3.11, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/32.0 requests/2.28.1 requests-toolbelt/0.9.1 urllib3/1.26.12 tqdm/4.62.3 importlib-metadata/4.11.0 keyring/21.8.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7833f81f58e76a3585ff59813e63fa278731c8d26fefe52ae12e783d38c8faea |
|
MD5 | 1a86c62c2712bee74684f2199b16dc65 |
|
BLAKE2b-256 | 9466e5b9335430acf14398d334e22d518c230a146f4a4c60a8b8dee0728a19e4 |
File details
Details for the file caio-0.9.12-cp311-cp311-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: caio-0.9.12-cp311-cp311-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 79.9 kB
- Tags: CPython 3.11, manylinux: glibc 2.12+ x86-64, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7e569b83e9b41d12e094190d0e1a546610829a65609f429a1845e3250d4c5804 |
|
MD5 | df2b810d4fce607866d5eb68616f0967 |
|
BLAKE2b-256 | 708a5cd5ff063eae39c8e5e9903b8b3809ca4e18cb0c999e8206dd7b4fe3f8a6 |
File details
Details for the file caio-0.9.12-cp311-cp311-macosx_10_9_universal2.whl
.
File metadata
- Download URL: caio-0.9.12-cp311-cp311-macosx_10_9_universal2.whl
- Upload date:
- Size: 38.2 kB
- Tags: CPython 3.11, macOS 10.9+ universal2 (ARM64, x86-64)
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 18df0caecfaa90ab9ac84ff71975fcf2342554b6f65ef69049337204b8b5af42 |
|
MD5 | da1ad6df3daee3e22826736c387895a8 |
|
BLAKE2b-256 | c34cda49fdad78afa9a6c7bd60340789939c0275ad4f3904b51c7ad67d2a4252 |
File details
Details for the file caio-0.9.12-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
.
File metadata
- Download URL: caio-0.9.12-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 79.3 kB
- Tags: CPython 3.10, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/32.0 requests/2.28.1 requests-toolbelt/0.9.1 urllib3/1.26.12 tqdm/4.62.3 importlib-metadata/4.11.0 keyring/21.8.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6285d772ae3a55e758b1bd3bc34f095757e4af45dcc30a183becf9bbdead8ced |
|
MD5 | f78c3147617c5e27fb45d2fabc9aa94e |
|
BLAKE2b-256 | 8472a360328d86dd85ccf62287357a21300f6e19d56a7798c3a7d34db25fb0b6 |
File details
Details for the file caio-0.9.12-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: caio-0.9.12-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 79.3 kB
- Tags: CPython 3.10, manylinux: glibc 2.12+ x86-64, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c0b7ffb561ca5c24e7f080aaa73ebb143ae659bd69645a748b332762c389349f |
|
MD5 | 77188e68ecd9b023ba21553afaa9ebf4 |
|
BLAKE2b-256 | 1a59d7f663f72ded6a5cb6a1d35721bbefc0e3d7d037e3e39a015f1eb59371ab |
File details
Details for the file caio-0.9.12-cp310-cp310-macosx_11_0_x86_64.whl
.
File metadata
- Download URL: caio-0.9.12-cp310-cp310-macosx_11_0_x86_64.whl
- Upload date:
- Size: 30.5 kB
- Tags: CPython 3.10, macOS 11.0+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | acd31b7828c6683bc46e467a32359f08c686d4c25a7e645c029a07c36685fea7 |
|
MD5 | d99bcab2f5d50ab6caa5dccabd6e2da0 |
|
BLAKE2b-256 | ef01e3c336c3e36724eeccf9bc9af1d29ae73ad8b2f8270e857fe3eb28af4855 |
File details
Details for the file caio-0.9.12-cp310-cp310-macosx_10_9_universal2.whl
.
File metadata
- Download URL: caio-0.9.12-cp310-cp310-macosx_10_9_universal2.whl
- Upload date:
- Size: 43.3 kB
- Tags: CPython 3.10, macOS 10.9+ universal2 (ARM64, x86-64)
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/32.0 requests/2.28.1 requests-toolbelt/0.9.1 urllib3/1.26.12 tqdm/4.62.3 importlib-metadata/4.11.0 keyring/21.8.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | df395e7e1c2025b3f32dbeff20a8b6491959fac8fbd5a9c2d452bf1f5c0ca2bf |
|
MD5 | 08e64ef88fc696165199809e821ce160 |
|
BLAKE2b-256 | f346e5707ccc034b65c8035179d151fdc15324922c7004e3ed17c23983771f98 |
File details
Details for the file caio-0.9.12-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
.
File metadata
- Download URL: caio-0.9.12-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 78.6 kB
- Tags: CPython 3.9, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/32.0 requests/2.28.1 requests-toolbelt/0.9.1 urllib3/1.26.12 tqdm/4.62.3 importlib-metadata/4.11.0 keyring/21.8.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 73c20d8fc7dfb140b7d57e69e6f17e1637d2ac4a9ebe0f5f8c94b56f87c5c087 |
|
MD5 | 974b417343a5cc1f54693e1ee6003561 |
|
BLAKE2b-256 | 4b82b97f57ab28e19906461fe0aa3cad81b7771bdb5eb58166e2dfd2473e0a32 |
File details
Details for the file caio-0.9.12-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: caio-0.9.12-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 78.6 kB
- Tags: CPython 3.9, manylinux: glibc 2.12+ x86-64, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b18318d04cad7ef985fc2fb86d43f866ba34c1ee3445385f2370d6f843c05c69 |
|
MD5 | 2fd29a750757e13aa9f44f2396dfe86d |
|
BLAKE2b-256 | 3f46794fd4b81557bb76fee72699a8ddb079b9e4d7d887408e2fdd40568dc1b7 |
File details
Details for the file caio-0.9.12-cp39-cp39-macosx_11_0_x86_64.whl
.
File metadata
- Download URL: caio-0.9.12-cp39-cp39-macosx_11_0_x86_64.whl
- Upload date:
- Size: 30.5 kB
- Tags: CPython 3.9, macOS 11.0+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 55317d2c90479a58108cfbd6816b85e584e61c48b42269c55f69cf4443857068 |
|
MD5 | a615e8016263b33bf10f85e025c1039e |
|
BLAKE2b-256 | 1d7983f922d194c7d636246edd0e6cc2b12d9aea00f6534ef077ea5fef823355 |
File details
Details for the file caio-0.9.12-cp39-cp39-macosx_10_9_universal2.whl
.
File metadata
- Download URL: caio-0.9.12-cp39-cp39-macosx_10_9_universal2.whl
- Upload date:
- Size: 43.3 kB
- Tags: CPython 3.9, macOS 10.9+ universal2 (ARM64, x86-64)
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/32.0 requests/2.28.1 requests-toolbelt/0.9.1 urllib3/1.26.12 tqdm/4.62.3 importlib-metadata/4.11.0 keyring/21.8.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 15192a28e054cd591489af82f4b1093f15338eb201a2399a337461ff0bbd9fc9 |
|
MD5 | 1f94339e8b2fc92a1453e740eb234aca |
|
BLAKE2b-256 | 255e04be8d7add3487c8b7a82842e713236164fd3be7491fdd0c3153e510eac4 |
File details
Details for the file caio-0.9.12-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
.
File metadata
- Download URL: caio-0.9.12-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 79.7 kB
- Tags: CPython 3.8, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/32.0 requests/2.28.1 requests-toolbelt/0.9.1 urllib3/1.26.12 tqdm/4.62.3 importlib-metadata/4.11.0 keyring/21.8.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3d6b424644ac37ce84f9dd99757d29e7cff01018d3b31f8ec0a38f2d5216165c |
|
MD5 | eed2617aefe571b6dbadce40741804c4 |
|
BLAKE2b-256 | c61d40a0d04e83fed0c5434d9e6036f64a87d41a68c975a1bb91f7460088cfcf |
File details
Details for the file caio-0.9.12-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: caio-0.9.12-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 79.7 kB
- Tags: CPython 3.8, manylinux: glibc 2.12+ x86-64, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | aa9a27973a03c777934decd577be577a61a188bee72272b3dc37a7cbc5eedf91 |
|
MD5 | 85501a9fa16b83a7969e3b0462aa5b68 |
|
BLAKE2b-256 | 776eb053b9c9514f3c600e5ea12afed851e2de5929445f4dda3085208d2c8907 |
File details
Details for the file caio-0.9.12-cp38-cp38-macosx_11_0_universal2.whl
.
File metadata
- Download URL: caio-0.9.12-cp38-cp38-macosx_11_0_universal2.whl
- Upload date:
- Size: 43.5 kB
- Tags: CPython 3.8, macOS 11.0+ universal2 (ARM64, x86-64)
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/32.0 requests/2.28.1 requests-toolbelt/0.9.1 urllib3/1.26.12 tqdm/4.62.3 importlib-metadata/4.11.0 keyring/21.8.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 820bb3ef23ce0d4096f822a8fea97ff2c239dd0351fa588801d2de627df9ab98 |
|
MD5 | aaf42735587482e92d4180a0b53bd6a6 |
|
BLAKE2b-256 | 04e36fc59ea3d231ad4e8ad7bd907972a2949a14126a53ccc4e6dc90570c2a57 |
File details
Details for the file caio-0.9.12-cp38-cp38-macosx_10_15_x86_64.whl
.
File metadata
- Download URL: caio-0.9.12-cp38-cp38-macosx_10_15_x86_64.whl
- Upload date:
- Size: 30.6 kB
- Tags: CPython 3.8, macOS 10.15+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a8204c6a7ea3c96057abba3da1690190b3cae0c3f03d81e9b5e3c99978b5bb6e |
|
MD5 | cb4b06d2214cdedf470fbe051a49066f |
|
BLAKE2b-256 | 9273ba1da056288249794b3f440c52bd987e7f214b02d770075ccc6d21b80be5 |
File details
Details for the file caio-0.9.12-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
.
File metadata
- Download URL: caio-0.9.12-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 77.9 kB
- Tags: CPython 3.7m, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/32.0 requests/2.28.1 requests-toolbelt/0.9.1 urllib3/1.26.12 tqdm/4.62.3 importlib-metadata/4.11.0 keyring/21.8.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9e65060717e27c702cd76a90be33250cae46be32a3009781ce382c8675fa7551 |
|
MD5 | dacaead62e2ae8b3484ced1debef8fc8 |
|
BLAKE2b-256 | 147ca338284aec96d3a0074c6e95f6d141ea8f00d8c8cdfc7db84aff9bc42286 |
File details
Details for the file caio-0.9.12-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: caio-0.9.12-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 77.7 kB
- Tags: CPython 3.7m, manylinux: glibc 2.12+ x86-64, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2759fe1957d0effb3bc38b3508b20fa37610bff9005f3926f570e6c06e901567 |
|
MD5 | 8788f61be46521ea61cffd8043ecede6 |
|
BLAKE2b-256 | 47caf7288a7d7efd5b246e79023f85c5c4fb7d8931c399c8796693b817a92835 |
File details
Details for the file caio-0.9.12-cp37-cp37m-macosx_10_15_x86_64.whl
.
File metadata
- Download URL: caio-0.9.12-cp37-cp37m-macosx_10_15_x86_64.whl
- Upload date:
- Size: 30.5 kB
- Tags: CPython 3.7m, macOS 10.15+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | aa1dab77aca0b2672b9a364f14a03e764c5d811c0ae1395f661a2b8f6723f958 |
|
MD5 | 663605f43290bd0bbf1b83c011cc1d40 |
|
BLAKE2b-256 | f2237e21c2bbe720e49a4e34ed7c9db2974ea2ec29e766ba95f80565f68d71f8 |
File details
Details for the file caio-0.9.12-cp37-cp37m-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: caio-0.9.12-cp37-cp37m-macosx_10_9_x86_64.whl
- Upload date:
- Size: 13.7 kB
- Tags: CPython 3.7m, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/32.0 requests/2.28.1 requests-toolbelt/0.9.1 urllib3/1.26.12 tqdm/4.62.3 importlib-metadata/4.11.0 keyring/21.8.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f366c595eda130a184f372d458d647b0ac879a46e872757648d4e29b6cea12ad |
|
MD5 | 293ba29204e6f07d62d11b9338974bb2 |
|
BLAKE2b-256 | debbbf821b2674a59d4b5926211ea8236345ed1fd8d4f2408abdf60ef883fd7e |