python’s built in async library that adds promise-like behaviour to Python.

Offloading to Threads

If you want to do io-heavy work in parallel you can use asyncio.to_thread to offload it.

 
for row in dataset:
 
    results = asyncio.gather(
	    asyncio.to_thread(lambda: some_io_thing(row)),
	    asyncio.to_thread(lambda: some_other_io_thing(row))
    )