MCPcopy Create free account
hub / github.com/apache/arrow / get_flight

Function get_flight

python/examples/flight/client.py:89–104  ·  view source on GitHub ↗
(args, client, connection_args={})

Source from the content-addressed store, hash-verified

87
88
89def get_flight(args, client, connection_args={}):
90 if args.path:
91 descriptor = pyarrow.flight.FlightDescriptor.for_path(*args.path)
92 else:
93 descriptor = pyarrow.flight.FlightDescriptor.for_command(args.command)
94
95 info = client.get_flight_info(descriptor)
96 for endpoint in info.endpoints:
97 print('Ticket:', endpoint.ticket)
98 for location in endpoint.locations:
99 print(location)
100 get_client = pyarrow.flight.FlightClient(location,
101 **connection_args)
102 reader = get_client.do_get(endpoint.ticket)
103 df = reader.read_pandas()
104 print(df)
105
106
107def _add_common_arguments(parser):

Callers

nothing calls this directly

Calls 4

FlightClientMethod · 0.80
get_flight_infoMethod · 0.45
do_getMethod · 0.45
read_pandasMethod · 0.45

Tested by

no test coverage detected