-
-
Save paleolimbot/9fcdb8e8fee301db6c68d2e32efd54c6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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