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
caio-0.6.2.tar.gz
(18.5 kB
view hashes)
Built Distributions
Close
Hashes for caio-0.6.2-cp39-cp39-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d6da75ccc1a1e6ddf4a052db5dc35299280b323827b97eff5522fc09d87247e6 |
|
MD5 | 7f6e6fd09cda0296ff3c2319f22ee9e5 |
|
BLAKE2b-256 | 7ff2b75a7e70bb702ec0811c1fcbd85147fe10cdfb1de1ea732cbaf81b3d591a |
Close
Hashes for caio-0.6.2-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e99a44192c7b3e58e131b5f0d7fe73b22aa2213b8adcd889a41c6a5253060a65 |
|
MD5 | 235c5e5bd1c34162edaea9cd815a8c0d |
|
BLAKE2b-256 | deb07b2b5aba682318c92c8e198e98eca7e4f154d9970ca112f657608a9b2bdf |
Close
Hashes for caio-0.6.2-cp38-cp38-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fd5aeeb7aa584ac6555db1e36c077c7df866df110a2ef48f870c97d0d9beb387 |
|
MD5 | 4b7380b113b0beba33fe5a531c4e4e64 |
|
BLAKE2b-256 | f96a53fc0d0ddc743a40d9a1d51c9b31dad56ed246d404f3f333f1440576c853 |
Close
Hashes for caio-0.6.2-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7cc942997b300c2418cd4bfcb6f6d150d1a6d830c5013e804ee5730d0a8eaf8e |
|
MD5 | 203e420d4a7419c4a845d3585e229f6f |
|
BLAKE2b-256 | 01035ef44603a81c5ebb81a1e01d91f055041bd4d70b1c0aed90508ce3435519 |
Close
Hashes for caio-0.6.2-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b056934106491b0b61ea70adf66702a3fa4a863b713f0b7ed68cf0b60f6160c4 |
|
MD5 | ee67b224d8276da4c6626bfeacc33b3f |
|
BLAKE2b-256 | 398af0908745f591f9622cd6a3418eebae08010fe8b254e243406937cebf0856 |
Close
Hashes for caio-0.6.2-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 654ce616fdc9e46b60b8335ea1d54858d331e828394ca9761954e37b1c255c45 |
|
MD5 | d46f6f25588365dc84fcfb4e74cdd12b |
|
BLAKE2b-256 | 0183f6feceea9c39863041f284f178f948b9136eb05ae57f876f61ec7de0720d |
Close
Hashes for caio-0.6.2-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0dae3d8092fefb2fa6f7f3576d5ce4d6214d2967ea09f0af288ddfdaf5fd5980 |
|
MD5 | d9ae407f3bede7940f4080ca88d27027 |
|
BLAKE2b-256 | fb96a50872273ffac81955af389ececcf047da3071d2874fedb76c14145b4269 |
Close
Hashes for caio-0.6.2-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7399236687a311e4e07cc4ef692d7af70d1808171ac6ee14b7b9a1cbcc7b4e6d |
|
MD5 | e7791dfa66b1495e1fa222b7d6253000 |
|
BLAKE2b-256 | 95e25fa1cad7e5fa17fdb3c4e78a35aca4e63446af1b5ba882cb533d129fc647 |
Close
Hashes for caio-0.6.2-cp35-cp35m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 311b38632b4e800ae95734bb8c61eecb84e72f70cce4a4357e93d73a36910300 |
|
MD5 | c85427651a1d3aafa2f9f8c6974b4f1b |
|
BLAKE2b-256 | 66f94ca53d7d70b0964fb754aa91076e86d4580427a7ac7a38c5a73ea2b3a9df |
Close
Hashes for caio-0.6.2-cp35-cp35m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 95220e7307afe9cd9002ac1e5ee7b8acde6457adbcc5d6b415f17325cd7757bc |
|
MD5 | 78afa2da0f7f1fef5a5fc0030ec6c637 |
|
BLAKE2b-256 | 49b4685e73cfa7f63450f0a26eee3ba4e8c6aa51d51e324e7a6691fed03a3037 |