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
- Host: GitHub
- URL: https://github.com/qweeze/uring_file
- Owner: qweeze
- License: mit
- Created: 2020-11-01T12:28:32.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-02-19T15:31:36.000Z (almost 5 years ago)
- Last Synced: 2025-04-01T15:50:17.421Z (9 months ago)
- Topics: asyncio, liburing, python
- Language: Python
- Homepage:
- Size: 9.77 KB
- Stars: 28
- Watchers: 2
- Forks: 5
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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