An open API service indexing awesome lists of open source software.

https://github.com/qweeze/uring_file

Asynchronous file I/O with io_uring and asyncio
https://github.com/qweeze/uring_file

asyncio liburing python

Last synced: 8 months ago
JSON representation

Asynchronous file I/O with io_uring and asyncio

Awesome Lists containing this project

README

          

### Requires

- python 3.8+
- linux kernel 5.7+

### Usage

```python
f = uring_file.File('hello.txt')
await f.open(os.O_CREAT | os.O_WRONLY)
await f.write(b'hello\nworld')
await f.close()

# or as a context manager:
async with uring_file.open('hello.txt') as f:
async for line in f:
print(line)
```

### Links

- [Python wrapper](https://github.com/YoSTEALTH/Liburing) for liburing
- [Lord of the io_uring](https://unixism.net/loti/) tutorial