Asynchronous file IO for Linux MacOS or Windows.
Project description
Python wrapper for AIO
NOTE: Native Linux aio implementation supports since 4.18 kernel version.
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.
- In runtime use the environment variable
CAIO_IMPLwith possible values:linux- use native linux kernels aio mechanismthread- use thread based implementation written in Cpython- use pure python implementation
- File
default_implementationlocated near__init__.pyin 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 oflinuxthreadorpython.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file caio-0.9.25.tar.gz.
File metadata
- Download URL: caio-0.9.25.tar.gz
- Upload date:
- Size: 26.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
16498e7f81d1d0f5a4c0ad3f2540e65fe25691376e0a5bd367f558067113ed10
|
|
| MD5 |
e48f0055de6e5cc29980fc5506d3da1f
|
|
| BLAKE2b-256 |
9288b8527e1b00c1811db339a1df8bd1ae49d146fcea9d6a5c40e3a80aaeb38d
|
File details
Details for the file caio-0.9.25-py3-none-any.whl.
File metadata
- Download URL: caio-0.9.25-py3-none-any.whl
- Upload date:
- Size: 19.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
06c0bb02d6b929119b1cfbe1ca403c768b2013a369e2db46bfa2a5761cf82e40
|
|
| MD5 |
421f1d860fdef8b583e4dc98885cdb38
|
|
| BLAKE2b-256 |
86931f76c8d1bafe3b0614e06b2195784a3765bbf7b0a067661af9e2dd47fc33
|
File details
Details for the file caio-0.9.25-cp314-cp314-manylinux2010_x86_64.manylinux2014_x86_64.manylinux_2_12_x86_64.manylinux_2_17_x86_64.whl.
File metadata
- Download URL: caio-0.9.25-cp314-cp314-manylinux2010_x86_64.manylinux2014_x86_64.manylinux_2_12_x86_64.manylinux_2_17_x86_64.whl
- Upload date:
- Size: 81.8 kB
- Tags: CPython 3.14, manylinux: glibc 2.12+ x86-64, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
44a6b58e52d488c75cfaa5ecaa404b2b41cc965e6c417e03251e868ecd5b6d77
|
|
| MD5 |
53c91d95f15e6b41b6d6e06aff64f520
|
|
| BLAKE2b-256 |
5e6cd4d24f65e690213c097174d26eda6831f45f4734d9d036d81790a27e7b78
|
File details
Details for the file caio-0.9.25-cp314-cp314-macosx_10_15_universal2.whl.
File metadata
- Download URL: caio-0.9.25-cp314-cp314-macosx_10_15_universal2.whl
- Upload date:
- Size: 37.0 kB
- Tags: CPython 3.14, macOS 10.15+ universal2 (ARM64, x86-64)
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fab6078b9348e883c80a5e14b382e6ad6aabbc4429ca034e76e730cf464269db
|
|
| MD5 |
c8dce8bf2688a28bc43926e53fd2a05a
|
|
| BLAKE2b-256 |
69caa08fdc7efdcc24e6a6131a93c85be1f204d41c58f474c42b0670af8c016b
|
File details
Details for the file caio-0.9.25-cp313-cp313-manylinux2010_x86_64.manylinux2014_x86_64.manylinux_2_12_x86_64.manylinux_2_17_x86_64.whl.
File metadata
- Download URL: caio-0.9.25-cp313-cp313-manylinux2010_x86_64.manylinux2014_x86_64.manylinux_2_12_x86_64.manylinux_2_17_x86_64.whl
- Upload date:
- Size: 81.9 kB
- Tags: CPython 3.13, manylinux: glibc 2.12+ x86-64, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0998210a4d5cd5cb565b32ccfe4e53d67303f868a76f212e002a8554692870e6
|
|
| MD5 |
900c2ea22dc96eb17c91b2624bb58a6b
|
|
| BLAKE2b-256 |
a39ff21af50e72117eb528c422d4276cbac11fb941b1b812b182e0a9c70d19c5
|
File details
Details for the file caio-0.9.25-cp313-cp313-macosx_10_13_universal2.whl.
File metadata
- Download URL: caio-0.9.25-cp313-cp313-macosx_10_13_universal2.whl
- Upload date:
- Size: 37.0 kB
- Tags: CPython 3.13, macOS 10.13+ universal2 (ARM64, x86-64)
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d6c2a3411af97762a2b03840c3cec2f7f728921ff8adda53d7ea2315a8563451
|
|
| MD5 |
16f69aca2e889ba4a08b1d8a54b30bab
|
|
| BLAKE2b-256 |
31575e6ff127e6f62c9f15d989560435c642144aa4210882f9494204bc892305
|
File details
Details for the file caio-0.9.25-cp312-cp312-manylinux2010_x86_64.manylinux2014_x86_64.manylinux_2_12_x86_64.manylinux_2_17_x86_64.whl.
File metadata
- Download URL: caio-0.9.25-cp312-cp312-manylinux2010_x86_64.manylinux2014_x86_64.manylinux_2_12_x86_64.manylinux_2_17_x86_64.whl
- Upload date:
- Size: 82.0 kB
- Tags: CPython 3.12, manylinux: glibc 2.12+ x86-64, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
97084e4e30dfa598449d874c4d8e0c8d5ea17d2f752ef5e48e150ff9d240cd64
|
|
| MD5 |
c3049d18c998d74158bb52ec74bf561e
|
|
| BLAKE2b-256 |
a32b21288691f16d479945968a0a4f2856818c1c5be56881d51d4dac9b255d26
|
File details
Details for the file caio-0.9.25-cp312-cp312-macosx_10_13_universal2.whl.
File metadata
- Download URL: caio-0.9.25-cp312-cp312-macosx_10_13_universal2.whl
- Upload date:
- Size: 37.0 kB
- Tags: CPython 3.12, macOS 10.13+ universal2 (ARM64, x86-64)
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fb7ff95af4c31ad3f03179149aab61097a71fd85e05f89b4786de0359dffd044
|
|
| MD5 |
a1fcafe2b2662edf4b83ba2fb0e0dade
|
|
| BLAKE2b-256 |
d32579c98ebe12df31548ba4eaf44db11b7cad6b3e7b4203718335620939083c
|
File details
Details for the file caio-0.9.25-cp311-cp311-manylinux2010_x86_64.manylinux2014_x86_64.manylinux_2_12_x86_64.manylinux_2_17_x86_64.whl.
File metadata
- Download URL: caio-0.9.25-cp311-cp311-manylinux2010_x86_64.manylinux2014_x86_64.manylinux_2_12_x86_64.manylinux_2_17_x86_64.whl
- Upload date:
- Size: 80.3 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/6.2.0 CPython/3.10.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bf84bfa039f25ad91f4f52944452a5f6f405e8afab4d445450978cd6241d1478
|
|
| MD5 |
74c20988776cc36e8167e4ee79ea6fcf
|
|
| BLAKE2b-256 |
513b36f3e8ec38dafe8de4831decd2e44c69303d2a3892d16ceda42afed44e1b
|
File details
Details for the file caio-0.9.25-cp311-cp311-macosx_10_9_universal2.whl.
File metadata
- Download URL: caio-0.9.25-cp311-cp311-macosx_10_9_universal2.whl
- Upload date:
- Size: 36.8 kB
- Tags: CPython 3.11, macOS 10.9+ universal2 (ARM64, x86-64)
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d6956d9e4a27021c8bd6c9677f3a59eb1d820cc32d0343cea7961a03b1371965
|
|
| MD5 |
5d255fee34f819e1083e5d60683de236
|
|
| BLAKE2b-256 |
ec90543f556fcfcfa270713eef906b6352ab048e1e557afec12925c991dc93c2
|
File details
Details for the file caio-0.9.25-cp310-cp310-manylinux2010_x86_64.manylinux2014_x86_64.manylinux_2_12_x86_64.manylinux_2_17_x86_64.whl.
File metadata
- Download URL: caio-0.9.25-cp310-cp310-manylinux2010_x86_64.manylinux2014_x86_64.manylinux_2_12_x86_64.manylinux_2_17_x86_64.whl
- Upload date:
- Size: 79.7 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/6.2.0 CPython/3.10.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
db9b5681e4af8176159f0d6598e73b2279bb661e718c7ac23342c550bd78c241
|
|
| MD5 |
17b89432c941facf34f49b2515260a13
|
|
| BLAKE2b-256 |
17b936715c97c873649d1029001578f901b50250916295e3dddf20c865438865
|
File details
Details for the file caio-0.9.25-cp310-cp310-macosx_10_9_universal2.whl.
File metadata
- Download URL: caio-0.9.25-cp310-cp310-macosx_10_9_universal2.whl
- Upload date:
- Size: 36.8 kB
- Tags: CPython 3.10, macOS 10.9+ universal2 (ARM64, x86-64)
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ca6c8ecda611478b6016cb94d23fd3eb7124852b985bdec7ecaad9f3116b9619
|
|
| MD5 |
33fbfd64914f8b88feb354523d16b28e
|
|
| BLAKE2b-256 |
6a80ea4ead0c5d52a9828692e7df20f0eafe8d26e671ce4883a0a146bb91049e
|