Python asyncio.run boilerplate
Concurrency is built into Python via
asyncio.
AsyncIO generators are implemented with yield
much like synchronous generators.
async for
also simplifies expression of asynchronous for loops.
As in Julia, the expression of asynchronous structures in Python does not implement concurrent execution. Concurrent execution in Python is governed by collections of tasks or futures such as asyncio.gather and initiated by a runner such as asyncio.run
asyncio.subprocess
AsyncIO subprocess may need specific asyncio loop configuration. The options needed are not the same for every project, depending on the asynchronous functions used.
Example date_coro.py uses AsyncIO subprocess.
asyncio.open_connection
For networking apps asyncio.open_connection allows massive amounts of connection, as shown in findssh.