Hey! Is there a way to run async code (async def f...
# ask-community
b
Hey! Is there a way to run async code (async def function) inside a prefect task? Should I create a loop and then pass this coro in loop.run_until_complete () inside @task?
k
Hey @bral, it is not first class in current Prefect but it’s first class in Orion (Prefect 2.0). Have you seen the Orion docs ?
upvote 1
You can look at this though and see if it helps you
👍 1
b
@Kevin Kho Thanks for the quick response. I saw this feature in prefect 2.0. But there is probably some way to get it running in the current latest version.