asyncio interfaces
Is your feature request related to a problem? Please describe. tinytag is part of a larger app that needs to handle events as they arise. It would be useful if there was an asyncio interface to share CPU time.
Describe the solution you'd like File reads for large files to use aiofiles or equivalent so that they aren't fully blocking reads.
Describe alternatives you've considered
Pushing the tinytag.get() call into an asyncio thread executor... which would work, but this feature feels like something that tinytag should support natively.
Would this change be enough? https://github.com/devsnd/tinytag/pull/178
Without an await somewhere, it is still holding the execution lock.
I assume you could do something like
async with aiofiles.open('filename', mode='rb') as f:
contents = await f.read()
tag = TinyTag.get(file_obj=BytesIO(contents))
If this isn't enough, suggestions on how to accomplish what you need without adding asyncio and aiofiles as dependencies to tinytag would be welcome.