从同步代码中评估异步代码
项目描述
async-eval
from async_eval import eval
async def foo() -> int:
return 10
print(eval("await foo()"))
从同步代码中评估异步代码
from async_eval import eval
async def foo() -> int:
return 10
print(eval("await foo()"))