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

Class ExampleServer

python/pyarrow/tests/test_flight_async.py:28–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26
27
28class ExampleServer(flight.FlightServerBase):
29 simple_info = flight.FlightInfo(
30 pyarrow.schema([("a", "int32")]),
31 flight.FlightDescriptor.for_command(b"simple"),
32 []
33 )
34
35 def get_flight_info(self, context, descriptor):
36 if descriptor.command == b"simple":
37 return self.simple_info
38 elif descriptor.command == b"unknown":
39 raise NotImplementedError("Unknown command")
40
41 raise NotImplementedError("Unknown descriptor")
42
43
44def async_or_skip(client):

Callers 1

flight_clientFunction · 0.85

Calls 1

schemaMethod · 0.45

Tested by 1

flight_clientFunction · 0.68