Skip to main content

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())

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:

  1. Upgrade the kernel

  2. Use compatible file system

  3. 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


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.9.5.tar.gz (24.5 kB view details)

Uploaded Source

Built Distributions

caio-0.9.5-py3-none-any.whl (18.5 kB view details)

Uploaded Python 3

caio-0.9.5-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (87.8 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.12+ x86-64

caio-0.9.5-cp310-cp310-macosx_10_15_x86_64.whl (30.0 kB view details)

Uploaded CPython 3.10 macOS 10.15+ x86-64

caio-0.9.5-cp310-cp310-macosx_10_9_universal2.whl (42.7 kB view details)

Uploaded CPython 3.10 macOS 10.9+ universal2 (ARM64, x86-64)

caio-0.9.5-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (87.0 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.12+ x86-64

caio-0.9.5-cp39-cp39-macosx_10_15_x86_64.whl (30.0 kB view details)

Uploaded CPython 3.9 macOS 10.15+ x86-64

caio-0.9.5-cp39-cp39-macosx_10_9_universal2.whl (42.7 kB view details)

Uploaded CPython 3.9 macOS 10.9+ universal2 (ARM64, x86-64)

caio-0.9.5-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (87.6 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

caio-0.9.5-cp38-cp38-macosx_11_0_universal2.whl (42.8 kB view details)

Uploaded CPython 3.8 macOS 11.0+ universal2 (ARM64, x86-64)

caio-0.9.5-cp38-cp38-macosx_10_14_x86_64.whl (29.8 kB view details)

Uploaded CPython 3.8 macOS 10.14+ x86-64

caio-0.9.5-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (87.4 kB view details)

Uploaded CPython 3.7m manylinux: glibc 2.12+ x86-64

caio-0.9.5-cp37-cp37m-macosx_10_14_x86_64.whl (29.8 kB view details)

Uploaded CPython 3.7m macOS 10.14+ x86-64

caio-0.9.5-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (85.7 kB view details)

Uploaded CPython 3.6m manylinux: glibc 2.12+ x86-64

caio-0.9.5-cp36-cp36m-macosx_10_14_x86_64.whl (29.8 kB view details)

Uploaded CPython 3.6m macOS 10.14+ x86-64

File details

Details for the file caio-0.9.5.tar.gz.

File metadata

  • Download URL: caio-0.9.5.tar.gz
  • Upload date:
  • Size: 24.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for caio-0.9.5.tar.gz
Algorithm Hash digest
SHA256 167d9342a807bae441b2e88f9ecb62da2f236b319939a8679f68f510a0194c40
MD5 465b898bc3c6fa298c40f051146e8903
BLAKE2b-256 e6e223cfb1be5f5bb95fe953526aac590725ddecb645bcb0c72958e03dbb99ce

See more details on using hashes here.

File details

Details for the file caio-0.9.5-py3-none-any.whl.

File metadata

  • Download URL: caio-0.9.5-py3-none-any.whl
  • Upload date:
  • Size: 18.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.4 CPython/3.6.8

File hashes

Hashes for caio-0.9.5-py3-none-any.whl
Algorithm Hash digest
SHA256 3c74d84dff2bec5f93685cf2f32eb22e4cc5663434a9be5f4a759247229b69b3
MD5 9f37bf7071b70c8122d690159126718e
BLAKE2b-256 e5ef48ad5544b4dd01a754dc540c362630ee2a68b43def3f4ed3ee029132d9db

See more details on using hashes here.

File details

Details for the file caio-0.9.5-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

  • Download URL: caio-0.9.5-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
  • Upload date:
  • Size: 87.8 kB
  • Tags: CPython 3.10, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for caio-0.9.5-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 013aa374158c5074b3c65a0da6b9c6b20a987d85fb317dd077b045e84e2478e1
MD5 7e7ad918f0574e2742f83d893e8bdb3d
BLAKE2b-256 d0ae3509118d8f5423bb9ff1055e3caa11f8ec08326cdac1c82f71a59491e091

See more details on using hashes here.

File details

Details for the file caio-0.9.5-cp310-cp310-macosx_10_15_x86_64.whl.

File metadata

  • Download URL: caio-0.9.5-cp310-cp310-macosx_10_15_x86_64.whl
  • Upload date:
  • Size: 30.0 kB
  • Tags: CPython 3.10, macOS 10.15+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2

File hashes

Hashes for caio-0.9.5-cp310-cp310-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 cd1c20aab04c18f0534b3f0b59103a94dede3c7d7b43c9cc525df3980b4c7c54
MD5 958fd329c409a4825f5adbe562a2f2c1
BLAKE2b-256 b65f97a57bee885cf31eacd3ea24a15684a920ac2aa64f59611560db5ae95aee

See more details on using hashes here.

File details

Details for the file caio-0.9.5-cp310-cp310-macosx_10_9_universal2.whl.

File metadata

  • Download URL: caio-0.9.5-cp310-cp310-macosx_10_9_universal2.whl
  • Upload date:
  • Size: 42.7 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.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.0 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2

File hashes

Hashes for caio-0.9.5-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 dd316270757d77f384c97e336588267e7942c1f1492a3a2e07b9a80dca027538
MD5 0e43d70c36b21f2276570a5a856673fd
BLAKE2b-256 e0b87aff3ce6b454688e0d61dc74395fcf6521d188ce3bba35a32fd77f2a9997

See more details on using hashes here.

File details

Details for the file caio-0.9.5-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

  • Download URL: caio-0.9.5-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
  • Upload date:
  • Size: 87.0 kB
  • Tags: CPython 3.9, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for caio-0.9.5-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 01061288391020f28e1ab8b0437420f7fe1e0ecc29b4107f7a8dcf7789f33b22
MD5 735ae23a30b37842a82eeefc5ab5f812
BLAKE2b-256 52f4974959945fa8415c05fa2faaf036e2322d9139438bbad46a162f9f2f9abb

See more details on using hashes here.

File details

Details for the file caio-0.9.5-cp39-cp39-macosx_10_15_x86_64.whl.

File metadata

  • Download URL: caio-0.9.5-cp39-cp39-macosx_10_15_x86_64.whl
  • Upload date:
  • Size: 30.0 kB
  • Tags: CPython 3.9, macOS 10.15+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for caio-0.9.5-cp39-cp39-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 0427a58c1814a091bfbb84318d344fdb9a68f3d49adc74e5fdc7bc9478e1e4fe
MD5 109e154bd425822668fc530aecaf5d19
BLAKE2b-256 82bf9a17d998da90686e8367abcba4bea784b759ff91918677008204dfcea12d

See more details on using hashes here.

File details

Details for the file caio-0.9.5-cp39-cp39-macosx_10_9_universal2.whl.

File metadata

  • Download URL: caio-0.9.5-cp39-cp39-macosx_10_9_universal2.whl
  • Upload date:
  • Size: 42.7 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.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.0 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2

File hashes

Hashes for caio-0.9.5-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 7f48fa58e5f699b428f1fd85e394ecec05be4048fcaf1fdf1981b748cd1e03a6
MD5 71b5736688e82e005cd0a6aa7d37137a
BLAKE2b-256 227d977654e10a5e81d51e5a320df871cef53390a792c71e6b7dfc4b9de2caf7

See more details on using hashes here.

File details

Details for the file caio-0.9.5-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

  • Download URL: caio-0.9.5-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
  • Upload date:
  • Size: 87.6 kB
  • Tags: CPython 3.8, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for caio-0.9.5-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 15f70d27e1009d279e4f9ff86290aad00b0511ce82a1879c40745244f0a9ec92
MD5 fbdd135a01fc9adedb4679ddf8561168
BLAKE2b-256 933b1ea48d00cc6eb4f84972a1d258abc91dc7db12a272f2a62441773a75e6c7

See more details on using hashes here.

File details

Details for the file caio-0.9.5-cp38-cp38-macosx_11_0_universal2.whl.

File metadata

  • Download URL: caio-0.9.5-cp38-cp38-macosx_11_0_universal2.whl
  • Upload date:
  • Size: 42.8 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.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.0 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2

File hashes

Hashes for caio-0.9.5-cp38-cp38-macosx_11_0_universal2.whl
Algorithm Hash digest
SHA256 7a19dfdec6736affb645da233a6007c2590678490d2a1e0f1fb82a696c0a1ddf
MD5 3725a74d54aaf5e6619e6ea2ec0f0ae5
BLAKE2b-256 22be5e716aa3b9c85144b31d311dcb9ea0e8211daf4d13960a9124b21fd2991b

See more details on using hashes here.

File details

Details for the file caio-0.9.5-cp38-cp38-macosx_10_14_x86_64.whl.

File metadata

  • Download URL: caio-0.9.5-cp38-cp38-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 29.8 kB
  • Tags: CPython 3.8, macOS 10.14+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.12

File hashes

Hashes for caio-0.9.5-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 3ffc6259239e03962f9e14829e02795ca9d196eedf32fe61688ba6ed33da46c8
MD5 707503474981cbe54df5a5a86eff8487
BLAKE2b-256 b996887c1f1c534eee1d5cd880273d4c968e24ba33c4b6aa8eab5bf2c31fbda2

See more details on using hashes here.

File details

Details for the file caio-0.9.5-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

  • Download URL: caio-0.9.5-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
  • Upload date:
  • Size: 87.4 kB
  • Tags: CPython 3.7m, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for caio-0.9.5-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 b8b6be369139edd678817dc0a313392d710f66fb521c275dce0a9067089b346b
MD5 f5793d9a5446c90bb4eb1b77f1e8ee13
BLAKE2b-256 30ea382a1537b255ad495d570b29c73ee8b73740fe188fc8f15e951b0cfcb2d1

See more details on using hashes here.

File details

Details for the file caio-0.9.5-cp37-cp37m-macosx_10_14_x86_64.whl.

File metadata

  • Download URL: caio-0.9.5-cp37-cp37m-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 29.8 kB
  • Tags: CPython 3.7m, macOS 10.14+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.7.12

File hashes

Hashes for caio-0.9.5-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 4fe9eff5cf7a2d6f3f418aeeccd11ce9a38329e07527b6f52da085edb44bc2fd
MD5 0f3dbdf576704a86a74a5cc635873253
BLAKE2b-256 c4acd54e526c7b33d99f9dfaf7f1ccddff4373ba12c2d11edb88bffa68513383

See more details on using hashes here.

File details

Details for the file caio-0.9.5-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

  • Download URL: caio-0.9.5-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
  • Upload date:
  • Size: 85.7 kB
  • Tags: CPython 3.6m, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for caio-0.9.5-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 97d9a10522a8a25798229fc1113cfaba3832b1cd0c1a3648b009b9740ef5e054
MD5 e0901dedba13a019391ecfc31319aefc
BLAKE2b-256 fa3656eed09f23bdb5c11902270c9b72569de59db95a9dc4627a5904c45d27b0

See more details on using hashes here.

File details

Details for the file caio-0.9.5-cp36-cp36m-macosx_10_14_x86_64.whl.

File metadata

  • Download URL: caio-0.9.5-cp36-cp36m-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 29.8 kB
  • Tags: CPython 3.6m, macOS 10.14+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.4 CPython/3.6.15

File hashes

Hashes for caio-0.9.5-cp36-cp36m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 d767faf537a9ea774e8408ba15a0f1dc734f06857c2d28bdf4258a63b5885f42
MD5 cb526b4ccb256146b2070ba0e21461f7
BLAKE2b-256 791c1aca3078ed722d34eed1366aa71fc5db357acb567890549fabcb013e591e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page