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

Uploaded Source

Built Distributions

caio-0.6.1-cp38-cp38-manylinux2010_x86_64.whl (104.6 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

caio-0.6.1-cp38-cp38-macosx_10_9_x86_64.whl (42.4 kB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

caio-0.6.1-cp37-cp37m-manylinux2010_x86_64.whl (82.4 kB view details)

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

caio-0.6.1-cp37-cp37m-macosx_10_9_x86_64.whl (32.4 kB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

caio-0.6.1-cp36-cp36m-manylinux2010_x86_64.whl (77.0 kB view details)

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

caio-0.6.1-cp36-cp36m-macosx_10_9_x86_64.whl (32.4 kB view details)

Uploaded CPython 3.6m macOS 10.9+ x86-64

caio-0.6.1-cp35-cp35m-manylinux2010_x86_64.whl (80.1 kB view details)

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

caio-0.6.1-cp35-cp35m-macosx_10_6_intel.whl (38.0 kB view details)

Uploaded CPython 3.5m macOS 10.6+ intel

File details

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

File metadata

  • Download URL: caio-0.6.1.tar.gz
  • Upload date:
  • Size: 16.7 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.6.1.tar.gz
Algorithm Hash digest
SHA256 5f7af99181c757115f219a4bf9dc9c87de434e43bb5f089b3d8ec217f4aad567
MD5 e6e393c988762b27cfb64118fe964a37
BLAKE2b-256 ab96412ad3f1f26d6a50e825455455866f6676617aacd7a08210df08737ad97c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: caio-0.6.1-cp38-cp38-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 104.6 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.6.1-cp38-cp38-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 3204d834e2371051cdb244fae8d0ee5fccfda69d16345783993bbc93088f4a2c
MD5 dd585c94d0df3eb71fd44533723299ce
BLAKE2b-256 43b1ac165e257f93b41cdd559adeee06db3dd3c03ef69ce9b19afcc9b2ac2b48

See more details on using hashes here.

File details

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

File metadata

  • Download URL: caio-0.6.1-cp38-cp38-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 42.4 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.6.1-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 4879b72a7804b5da633b64e94b2531b9abc059fc6853ce35611d0a4ad393c14f
MD5 2af70437cc33375fd5ebb0d2aae8317f
BLAKE2b-256 4496f2f2db077dffee82b6d0dc2c55023cd54e4fddc64e338d719729abfbde5a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: caio-0.6.1-cp37-cp37m-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 82.4 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.6.1-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 8a46d57704114afd1f228b9a27a7b265f1e7ca38c0e1a0d35c29b1a4f1a9f915
MD5 2bd8bccd0ac8d27792736ffb55310052
BLAKE2b-256 febf39b09dee353dc7fce95b59afe1af28c41d5b83c25ee6accb4dad4cc6cc21

See more details on using hashes here.

File details

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

File metadata

  • Download URL: caio-0.6.1-cp37-cp37m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 32.4 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.6.1-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 5a2dcf77fc43693449f9e3961d17bcb75a87cc75ca8866279c32acf845e57da8
MD5 734f86b7d1feccbcf70e2a8209a064cc
BLAKE2b-256 cec1cf5fe97c90a318367ccb67f28f95f366ab7f5259d99a6344529e35e775c9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: caio-0.6.1-cp36-cp36m-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 77.0 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.6.1-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 36b0b3242f8b0207e4b432ff2967d386cc21895e8b3da906415997cbe11b57ec
MD5 aabc169a5ef7169a1d0b4ffa54835fef
BLAKE2b-256 5de251275b4d3aa1ddca9de64aa824babd52c626db14519df9f867148f346685

See more details on using hashes here.

File details

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

File metadata

  • Download URL: caio-0.6.1-cp36-cp36m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 32.4 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.6.1-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 cb955712ad6a8b4c326af03c11fc08b902b7bfebc53ab458bd42bb2ac6dd77fa
MD5 e0ebb80bdd8f158a31a626911829ba38
BLAKE2b-256 2be1efba1c2f9ee5d7c727f15603417b054077054a91a2960c2ccf8c6b88dc18

See more details on using hashes here.

File details

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

File metadata

  • Download URL: caio-0.6.1-cp35-cp35m-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 80.1 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.6.1-cp35-cp35m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 06a926dc744fc3f3c767be1230e2f421f0a862f67ba7a5639e2c288b7c0dc6e8
MD5 27669a5215acafddb18315e1988868a4
BLAKE2b-256 4e03a635c627c224c9d3a3f5772b91eb611263c4e31f3728ef4eea86ee2625c1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: caio-0.6.1-cp35-cp35m-macosx_10_6_intel.whl
  • Upload date:
  • Size: 38.0 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.6.1-cp35-cp35m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 8ca6b28c51646433017b02eeb412464adc67c7c20577c4a4e74229169769a896
MD5 1c510510dd4e889ad23c6ac81b773bb1
BLAKE2b-256 6d1a20ffd13145bfe7c43db4445d13fb48ed8398b2e2ab5856cca52198521362

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