ianmcook commented on PR #37:
URL: https://github.com/apache/arrow-experiments/pull/37#issuecomment-2356947092
Note for posterity:
To adapt this to work with just plain Starlette (no FastAPI):
1. Replace the FastAPI imports with:
```py
from starlette.applications import Starlette
from starlette.responses import StreamingResponse
from starlette.routing import Route
```
2. Replace `app = FastAPI()` and everything below that with:
```py
def main(request):
return StreamingResponse(
generate_bytes(schema, batches),
media_type="application/vnd.apache.arrow.stream"
)
app = Starlette(routes=[Route("/", endpoint=main)])
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]