Open
Description
For now, I'm using this approach, which should be in the asgiref
:
import functools
...
from asgiref.sync import async_to_sync as _async_to_sync
...
def async_to_sync(awaitable: Callable[P, Coroutine[Any, Any, T]]) -> Callable[P, T]:
return functools.wraps(awaitable)(_async_to_sync(awaitable))
Metadata
Metadata
Assignees
Labels
No labels