import asyncio
import pyngres.asyncio as py
import ctypes
...

async def exec_select():
    ...

    # allocate a sufficiently large list of IIAPI_DATAVALUEs  
    n_columns = 2
    datavalues = (py.IIAPI_DATAVALUE * n_columns)()

    # allocate buffers for name and weight
    name = ctypes.c_buffer(25)
    weight = ctypes.c_double()

    # point to the buffers 
    datavalues[0].dv_value = ctypes.addressof(name)
    datavalues[1].dv_value = ctypes.addressof(weight)

    ...
