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

Uploaded Source

Built Distributions

caio-0.6.0-cp38-cp38-manylinux2010_x86_64.whl (104.8 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

caio-0.6.0-cp38-cp38-macosx_10_9_x86_64.whl (42.5 kB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

caio-0.6.0-cp37-cp37m-manylinux2010_x86_64.whl (82.6 kB view details)

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

caio-0.6.0-cp37-cp37m-macosx_10_9_x86_64.whl (32.5 kB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

caio-0.6.0-cp36-cp36m-manylinux2010_x86_64.whl (78.4 kB view details)

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

caio-0.6.0-cp36-cp36m-macosx_10_9_x86_64.whl (32.5 kB view details)

Uploaded CPython 3.6m macOS 10.9+ x86-64

caio-0.6.0-cp35-cp35m-manylinux2010_x86_64.whl (80.3 kB view details)

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

caio-0.6.0-cp35-cp35m-macosx_10_6_intel.whl (38.1 kB view details)

Uploaded CPython 3.5m macOS 10.6+ intel

File details

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

File metadata

  • Download URL: caio-0.6.0.tar.gz
  • Upload date:
  • Size: 16.9 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.0.tar.gz
Algorithm Hash digest
SHA256 45663678990624b17571846d1843259d78aa26ee67ad0d1aa2d1b1f3850b03f3
MD5 738d6225f887f85298664f663b7b1311
BLAKE2b-256 b78a91f21068e5440857d9ddf00f92f011c2d1bf9ccf925ec227a93e7dacc111

See more details on using hashes here.

File details

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

File metadata

  • Download URL: caio-0.6.0-cp38-cp38-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 104.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.6.0-cp38-cp38-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 7b2cc8a0abbb21254450068baad96ad2974daa8be4a885d98c161a038f06b789
MD5 6a09636d50922c7e936443f4971cfc65
BLAKE2b-256 4af4859de196b61326acaf50561293dfa549eaf9d112c810e4a2245312667196

See more details on using hashes here.

File details

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

File metadata

  • Download URL: caio-0.6.0-cp38-cp38-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 42.5 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.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 aa19f861add5b311e1acf79e1946f1582de73af0eb4cfd039800c95fbf5f2171
MD5 a6c2597aab4d682566e5dab7e9cf4216
BLAKE2b-256 7ae5c3234fd2810e4c7b1a8c391e6db1bd3bb0c407dd5e736e2cfa0678cc2878

See more details on using hashes here.

File details

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

File metadata

  • Download URL: caio-0.6.0-cp37-cp37m-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 82.6 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.0-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 af6272afa3f73dabe317c5e45e27332102161fe5178f610deac34fab7f1a17ca
MD5 1e054985750020fb6d770586721f659d
BLAKE2b-256 3181e49269102cb4660fefc63efd444418fecba2ae596f084ebc281cff65d48c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: caio-0.6.0-cp37-cp37m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 32.5 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.0-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 531b13fd5df0307ff8a4c57c120c3eafd5b97f4794add3d0f7cbdaa12bcefc0e
MD5 733d9bca40afefb9832296565e48678d
BLAKE2b-256 4937043fbbe893f8ec6fe43e2d5e375e7e123b7b57f1cba163822ff0880bf840

See more details on using hashes here.

File details

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

File metadata

  • Download URL: caio-0.6.0-cp36-cp36m-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 78.4 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.0-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 d0099a6c818356ba6e0f9c4f0638e7a7ab83fae175f5632c927e6826a56f705c
MD5 d12d083da05c7858e430c8d654c23edb
BLAKE2b-256 fc03da2a06324e23c60dfdd0517890c46cc062587d2ae56b7a5094ac6681e1b1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: caio-0.6.0-cp36-cp36m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 32.5 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.0-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 99cb3456dfad2974fd8c6b63c4bdb0d70b9a56e712b8be087eaa2ad4392bd294
MD5 abe20d621b1c24ec6f9c1ed2dd159fab
BLAKE2b-256 4f1ffba2107a1639d72028f478ebfeb04946d513d60e5b899716ec31bed5352c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: caio-0.6.0-cp35-cp35m-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 80.3 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.0-cp35-cp35m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 87698afa9904eea7714380ad390c09d5242a90f8c2e49f7b74fed73f49bd956c
MD5 34d0598fc0b0b6423eeb2a4388449b9c
BLAKE2b-256 32150bb8948f2e361cc110404805e5fa6109beed05a6a15eb925c9b9227333e5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: caio-0.6.0-cp35-cp35m-macosx_10_6_intel.whl
  • Upload date:
  • Size: 38.1 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.0-cp35-cp35m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 7031ee1b963c3cb2b9d00781500e38d5babe9ecf7f5aff532dc31e5e946518c2
MD5 a0141386d1e46103445c19fc367727c1
BLAKE2b-256 37a61928161ef2d65b339d1cbf0b90b83a690b38b788209d1f9de5cdb00e2e4f

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