Starting from Python 3.7 awaitable coroutines can be easily called with asyncio.run()
method:
>>> import asyncio
>>> async def main():
... print('hello')
... await asyncio.sleep(1)
... print('world')
>>> asyncio.run(main())
hello
world
As you remember, similar code in Python 3.6 looks like:
>>> import asyncio
>>> async def main():
... print('hello')
... await asyncio.sleep(1)
... print('world')
>>> loop = asyncio.get_event_loop()
>>> loop.run_until_complete(main())
hello
world
>>> loop.close()
One more step to real asynchronous code.