pyarrow.flight.GeneratorStream

class pyarrow.flight.GeneratorStream(schema, generator, options=None)

Bases: FlightDataStream

A Flight data stream backed by a Python generator.

__init__()

Create a GeneratorStream from a Python generator.

Parameters:
schemaSchema

The schema for the data to be returned.

generatoriterator or iterable

The generator should yield other FlightDataStream objects, Tables, RecordBatches, or RecordBatchReaders.

optionspyarrow.ipc.IpcWriteOptions, optional

Methods

__init__

Create a GeneratorStream from a Python generator.