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

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

Uploaded Source

Built Distributions

caio-0.5.5-cp38-cp38-manylinux2010_x86_64.whl (106.8 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

caio-0.5.5-cp38-cp38-macosx_10_9_x86_64.whl (42.3 kB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

caio-0.5.5-cp37-cp37m-manylinux2010_x86_64.whl (81.9 kB view details)

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

caio-0.5.5-cp37-cp37m-macosx_10_9_x86_64.whl (32.2 kB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

caio-0.5.5-cp36-cp36m-manylinux2010_x86_64.whl (80.1 kB view details)

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

caio-0.5.5-cp36-cp36m-macosx_10_9_x86_64.whl (32.2 kB view details)

Uploaded CPython 3.6m macOS 10.9+ x86-64

caio-0.5.5-cp35-cp35m-manylinux2010_x86_64.whl (79.7 kB view details)

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

caio-0.5.5-cp35-cp35m-macosx_10_6_intel.whl (37.8 kB view details)

Uploaded CPython 3.5m macOS 10.6+ intel

File details

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

File metadata

  • Download URL: caio-0.5.5.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

Hashes for caio-0.5.5.tar.gz
Algorithm Hash digest
SHA256 34482eeede9185bc367e655cb8384a375706a239ad6abf5f55d78772386d7d51
MD5 d7376fa682b247fb6f6f781489ff157b
BLAKE2b-256 3d25f56e036940874e770e2acd51f1116bd77c32fe622fb4401c158913d6fc85

See more details on using hashes here.

File details

Details for the file caio-0.5.5-cp38-cp38-manylinux2010_x86_64.whl.

File metadata

  • Download URL: caio-0.5.5-cp38-cp38-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 106.8 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

Hashes for caio-0.5.5-cp38-cp38-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 b2741962549fceb8d4c856f90a99eb865d3514cfdd2878e776e8ab88daf86a3d
MD5 0fede145619c55e1e9b1956d646ac206
BLAKE2b-256 15b6d926bc27d3046ebbc57dfa643dbdd3e4bab6186887738faa216c2b38f05c

See more details on using hashes here.

File details

Details for the file caio-0.5.5-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: caio-0.5.5-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

Hashes for caio-0.5.5-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 3b5e1b7a26fa02837a7f0be84375fea08a43257a291e797b21897bf0aeeb3152
MD5 e1d7287b730a511c6308ab011069684d
BLAKE2b-256 a70e3a360c5de26d83ed91241d08867f84bfafb86b3d8d6857ddd10cf47d9106

See more details on using hashes here.

File details

Details for the file caio-0.5.5-cp37-cp37m-manylinux2010_x86_64.whl.

File metadata

  • Download URL: caio-0.5.5-cp37-cp37m-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 81.9 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

Hashes for caio-0.5.5-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 733942025b4aaab9da72dac556fd291cb173034aa18e4e7758f0bf5bfbca6a54
MD5 d8efbc1325f7477d525a139c2cde885b
BLAKE2b-256 30804d0acb01c3a9fabf4c6d70f1edc4297bcd80538859abea92c74ea49ed708

See more details on using hashes here.

File details

Details for the file caio-0.5.5-cp37-cp37m-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: caio-0.5.5-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

Hashes for caio-0.5.5-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 514c7c73305d36b449043b85d4f0583dd7a92c84e722b49a79c5aca1bd3d0c8e
MD5 50a82344af21a7ae373cda8b84da86a1
BLAKE2b-256 629cd14379ece1bb8f5c872c3a5e9464a8bb206381557d4a022182e235b2ea0b

See more details on using hashes here.

File details

Details for the file caio-0.5.5-cp36-cp36m-manylinux2010_x86_64.whl.

File metadata

  • Download URL: caio-0.5.5-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

Hashes for caio-0.5.5-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 934e5d2ee4970792656e1899277c3df8586a57babf3e9e4072edaec0d28b904e
MD5 6c14e3774f436f6ed0571bb12440d905
BLAKE2b-256 41f24739a80386a49aec47d0ededa6b15c8ba72c96820ab92463ca02ffc2f6d0

See more details on using hashes here.

File details

Details for the file caio-0.5.5-cp36-cp36m-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: caio-0.5.5-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

Hashes for caio-0.5.5-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 1e652c6d202332457ef68c47f9eeaf34d545d52a8566623c5ba0bf84732dd8ba
MD5 e8647f364594c2a298919d0d2c82ca68
BLAKE2b-256 2fb7b27d24fc7f22ac5c221faba55770cd6b755ea9ef7176f1766544042772d6

See more details on using hashes here.

File details

Details for the file caio-0.5.5-cp35-cp35m-manylinux2010_x86_64.whl.

File metadata

  • Download URL: caio-0.5.5-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

Hashes for caio-0.5.5-cp35-cp35m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 29f5864ea351872fb85de800cc84cf135390b6c7ac29f6da0f3a8301eb3960ce
MD5 41c02e670b94e01fea2f5fe8997dbccf
BLAKE2b-256 b2ede952d8a4001b3d1787bb36f154b03a69e3c88c7cfa0dd6e02d941b90d6ce

See more details on using hashes here.

File details

Details for the file caio-0.5.5-cp35-cp35m-macosx_10_6_intel.whl.

File metadata

  • Download URL: caio-0.5.5-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

Hashes for caio-0.5.5-cp35-cp35m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 1a9f56b311c0e76fa8709ea85db6d664e3fcf6e9e63507101c7654eacd078217
MD5 9db6254d1720f35bc162c3380b35ce14
BLAKE2b-256 d187ca86ea76093c99dcd4835193d1da7e40cff5facdf139872de7030153722a

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