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
Built Distributions
File details
Details for the file caio-0.5.6.tar.gz
.
File metadata
- Download URL: caio-0.5.6.tar.gz
- Upload date:
- Size: 16.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f253c96a78555f9ec597310dcb387684f4b6254e83c6d9772f78b3ed0faafb3d |
|
MD5 | 087c87633f08e9c320aeec0b642195e2 |
|
BLAKE2b-256 | f80965043630a99c3010af494cd5494274000316fa6f3a977ee9137c97378755 |
File details
Details for the file caio-0.5.6-cp38-cp38-manylinux2010_x86_64.whl
.
File metadata
- Download URL: caio-0.5.6-cp38-cp38-manylinux2010_x86_64.whl
- Upload date:
- Size: 106.9 kB
- Tags: CPython 3.8, manylinux: glibc 2.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 05c37bb8403ecf27347690b42e1230138017e58c22d002ba6718ee03a401f96f |
|
MD5 | 1f8b1a1808ad6e1b481f266321dfc0dd |
|
BLAKE2b-256 | 2392811475a0e987b0c76acb0a074acdfe6f43a3df7f6bed54724ec1e5bc76ee |
File details
Details for the file caio-0.5.6-cp38-cp38-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: caio-0.5.6-cp38-cp38-macosx_10_9_x86_64.whl
- Upload date:
- Size: 42.3 kB
- Tags: CPython 3.8, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c0aaaf05736993fe0f4ca3449ec5548be04fb20ffcfcc4e359afe52effbcafc2 |
|
MD5 | 567ecabfc7f5824a0840eeb99f9d3a03 |
|
BLAKE2b-256 | ffa29c5e1b01b19a8af40c3a3a8653049a6a2e1d01d949fa2105d2e8a7af731c |
File details
Details for the file caio-0.5.6-cp37-cp37m-manylinux2010_x86_64.whl
.
File metadata
- Download URL: caio-0.5.6-cp37-cp37m-manylinux2010_x86_64.whl
- Upload date:
- Size: 81.8 kB
- Tags: CPython 3.7m, manylinux: glibc 2.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 17753927de0ed732721cee40c3f81706127f6ff8b2bb8a259bb03a082a9f4390 |
|
MD5 | 34b8cfb0c0f2546cc5b8b2348e8da89f |
|
BLAKE2b-256 | fda172208243e5851e6ec23545cfc5457a7753f7d2808a45dfaf9ca6d42c93ec |
File details
Details for the file caio-0.5.6-cp37-cp37m-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: caio-0.5.6-cp37-cp37m-macosx_10_9_x86_64.whl
- Upload date:
- Size: 32.2 kB
- Tags: CPython 3.7m, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b125689ec3f266c8657d657e4a2ff486fb6e2649a662810a9e849803a8646019 |
|
MD5 | 1e4e8f73772de02fe841391ab8e5fece |
|
BLAKE2b-256 | 532e815a20c3955087c7462814b32b0810b1dc171f902b948ada09a73552d6eb |
File details
Details for the file caio-0.5.6-cp36-cp36m-manylinux2010_x86_64.whl
.
File metadata
- Download URL: caio-0.5.6-cp36-cp36m-manylinux2010_x86_64.whl
- Upload date:
- Size: 80.1 kB
- Tags: CPython 3.6m, manylinux: glibc 2.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fa1fb84ee064147181acc5cb30f015226972dd09cd9c8de9a238661eca42b516 |
|
MD5 | 16614f07f9c9a55d09e26e4b3c5f47ed |
|
BLAKE2b-256 | ba6251a8bc1976dd1d3a1cbb8a0f2cc40a9805d85ef20eb748d1a03046b98def |
File details
Details for the file caio-0.5.6-cp36-cp36m-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: caio-0.5.6-cp36-cp36m-macosx_10_9_x86_64.whl
- Upload date:
- Size: 32.2 kB
- Tags: CPython 3.6m, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e495a265992cabd1986271b12d2d2da387191c3c7d668be1443e1fb588900130 |
|
MD5 | d07f0256d5f21300731b4837ab10493b |
|
BLAKE2b-256 | bb0dc62765e330bd7a64329a7287d4facf5c21961272d5ac97a89678bef8bc10 |
File details
Details for the file caio-0.5.6-cp35-cp35m-manylinux2010_x86_64.whl
.
File metadata
- Download URL: caio-0.5.6-cp35-cp35m-manylinux2010_x86_64.whl
- Upload date:
- Size: 79.7 kB
- Tags: CPython 3.5m, manylinux: glibc 2.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f1f072b9c63aabde206ff9b471d952d41e149899fd168dc6707806cba9b2a334 |
|
MD5 | 07dac0bdf537f94b15c94269e819e529 |
|
BLAKE2b-256 | bf4e465eaca0262e85f483a292fa380ea8cae005155617e5277c2cf6bbb350b7 |
File details
Details for the file caio-0.5.6-cp35-cp35m-macosx_10_6_intel.whl
.
File metadata
- Download URL: caio-0.5.6-cp35-cp35m-macosx_10_6_intel.whl
- Upload date:
- Size: 37.8 kB
- Tags: CPython 3.5m, macOS 10.6+ intel
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e3bd2dbd9dd0374d01966e8030fe91177de8156f7ac7c825b93d15b4c287610a |
|
MD5 | 549b489dcf56780b3923f7c1b9cd4ba3 |
|
BLAKE2b-256 | d631997bf5525c3a9ad82f120ad13a672a7049931734db298bb4e024f3bbae79 |