Skip to content

Latest commit

 

History

History
23 lines (17 loc) · 456 Bytes

File metadata and controls

23 lines (17 loc) · 456 Bytes

Requires

  • python 3.8+
  • linux kernel 5.7+

Usage

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