HTTP GET Arrow Data: Simple Python Server Example with http.server

This directory contains a minimal example of an HTTP server implemented in Python using the built-in http.server module. The server:

  1. Creates a list of record batches and populates it with synthesized data.
  2. Listens for HTTP GET requests from clients.
  3. Upon receiving a request, sends an HTTP 200 response with the body containing an Arrow IPC stream of record batches.

To run this example:

pip install pyarrow
python server.py

[!NOTE]
This example implements chunked transfer encoding manually. Other servers may implement chunked transfer encoding automatically at the cost of an undesirable new layer of buffering. Arrow IPC streams already offer a natural way of chunking large amounts of tabular data. It's not a general requirement, but in this example each chunk corresponds to one Arrow record batch.