octomachinery.utils.asynctools module#

Asynchronous tools set.

async octomachinery.utils.asynctools.aio_gather(*aio_tasks)[source]#

Spawn async tasks and return results in the same order.

async octomachinery.utils.asynctools.aio_gather_iter(*aio_tasks)[source]#

Spawn async tasks and yield results.

async octomachinery.utils.asynctools.amap(callback, async_iterable)[source]#

Map asynchronous generator with a coroutine or a function.

octomachinery.utils.asynctools.auto_cleanup_aio_tasks(async_func)[source]#

Ensure all subtasks finish.

octomachinery.utils.asynctools.dict_to_kwargs_cb(callback)[source]#

Return a callback mapping dict to keyword arguments.

async octomachinery.utils.asynctools.try_await(potentially_awaitable)[source]#

Try awaiting the arg and return it regardless.