I did this code:
from asgiref.sync import sync_to_async
async def wrap_async(method, **parameters):
	return await sync_to_async(method)(**parameters)
 
In this way from nicegui I can do stuff like: user = await wrap_async(User.objects.get, id=user_id) but can be used also for other stuff.