Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

await async function from non async python

import asyncio

async def async_func():
  await asyncio.sleep(1) # <- replace this with your async code

loop = asyncio.get_event_loop()
coroutine = async_func()
loop.run_until_complete(coroutine)
Source by www.joeltok.com #
 
PREVIOUS NEXT
Tagged: #await #async #function #async #python
ADD COMMENT
Topic
Name
9+1 =