import asyncio

def run_once(loop):
    loop.call_soon(loop.stop)
loop.run_forever()
loop = asyncio.get_event_loop()
for i in range(100):
    print(('Iteration', i))
run_once(loop)
Is it possible to run only a single step of the asyncio event loop