Skip to main content

scorebook.utils.async_utils

Async utilities for handling callable objects and coroutines.

is_awaitable

def is_awaitable(obj: Callable) -> bool

Check if a callable object is awaitable.

This handles both coroutine functions and callable instances (like classes with call methods) that may return coroutines.

Arguments:

  • obj - The callable object to check

Returns:

True if the object is awaitable, False otherwise