GitHunt
TH

thegamecracks/asyreader

An asynchronous Python wrapper over blocking, file-like objects.

asyreader



import asyncio
from asyreader import AsyncReader

async def main():
    async with AsyncReader(lambda: open("file.txt", "rb")) as reader:
        await reader.read(32)

asyncio.run(main())

This Python library provides an AsyncReader class to transparently handle
blocking reads in a separate thread, useful for libraries that don't offer
an async interface. Anything that has a read() method and a close()
method can be passed.

Usage

With Python 3.11+ and Git, you can install this library with:

pip install git+https://github.com/thegamecracks/asyreader

License

This project can be used under the MIT License.

Languages

Python100.0%

Contributors

MIT License
Created January 19, 2024
Updated November 5, 2025