indieweb-utils icon indicating copy to clipboard operation
indieweb-utils copied to clipboard

Idea: Add asyncio support to IndieWeb Utils

Open capjamesg opened this issue 2 years ago • 1 comments

The IndieWeb Utils library has not implemented support for using functions with asyncio, a Python library used to write concurrent code.

@fluffy-critter inquired about support for asyncio in IndieWeb Utils. I wonder if this is a feature the library could include at some point.

capjamesg avatar Oct 23 '22 18:10 capjamesg

For context, asyncio is significantly faster than thread-per-connection when you're sending out a bunch of bulk updates, such as in Pushl. It usually requires some major refactoring to support correctly, though, and it would probably be more sensible to do it as an async-specific library which then later grows a blocking API wrapper.

The specific library I'd suggest to use for the HTTP parts is aiohttp, which is an async version of requests.

fluffy-critter avatar Oct 23 '22 19:10 fluffy-critter