I have a Python function that must be synchronous (non async) that needs to call an async function. Any way of doing it?
Motivation: async foo() is provided by a communication package and bar() is a callback of a GUI framework so I don't have control over their synchronicity but need to bridge the gap, having bar calling foo and using its returned value.
async def foo():
return 'xyz'
def bar():
value = ... foo()