def GetPutData()

in http/get_simple/python/server/fastapi_uvicorn/server.py [0:0]


def GetPutData():
    total_records = 100000000
    length = 4096
    ncolumns = 4

    arrays = []

    for x in range(0, ncolumns):
        buffer = pa.py_buffer(randbytes(length * 8))
        arrays.append(pa.Int64Array.from_buffers(
            pa.int64(), length, [None, buffer], null_count=0))

    batch = pa.record_batch(arrays, schema)
    batches = []

    records = 0
    while records < total_records:
        if records + length > total_records:
            last_length = total_records - records
            batches.append(batch.slice(0, last_length))
            records += last_length
        else:
            batches.append(batch)
            records += length

    return batches