Welcome to unblock’s documentation!

About the project

unblock provides small utilities that convert synchronous functions, methods, and classes into asynchronous ones for use inside an asyncio event loop. It offloads blocking work to a thread or process pool so it does not block the loop. Here is a basic example,

import asyncio
from unblock import asyncify

@asyncify
def my_sync_func():
    ...  # do something blocking

if __name__ == "__main__":
    asyncio.run(my_sync_func())

Get It Now

The distribution name is get-unblock; the import name is unblock.

pip install get-unblock

Indices and tables