Skip to content

Instantly share code, notes, and snippets.

@paleolimbot
Last active October 5, 2023 20:19
Show Gist options
  • Save paleolimbot/9fcdb8e8fee301db6c68d2e32efd54c6 to your computer and use it in GitHub Desktop.
Save paleolimbot/9fcdb8e8fee301db6c68d2e32efd54c6 to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# Import flight
from pyarrow import flight
# Register GeoArrow extension types to ensure types are propagated
import geoarrow.pyarrow as _
class FlightServer(flight.FlightServerBase):
def do_put(self, context, descriptor, reader, writer):
# Consume the entire input (to demonstrate how fast the entire
# input can be sent from client-to-server or vice versa)
reader.read_all()
if __name__ == "__main__":
server = FlightServer(location="grpc://0.0.0.0:8815")
server.serve()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment