the question is very simple. I am in an azure function environment using python as programming language. My goal is to create a nd-json because I have a huge result and I want it to be returned to the caller as nd-json in a stream so I can easily consume it chunk by chunk or better line by line.
The problem is that the
import azure.functions as func
func.HttpResponse
that has to be returned does only accept bytes, string or integer. There is no possibility to put a generator here.
I read on stackoverflow somebody who suggested to use a django StreamingHttpResponse. However this also does not help because in the end I have to encapslulate it into the HttpResponse object from python.
So is there really no way in azure function context to create a real nd-json ? This would be really a shame because I don't want to use orchestration or some other overly sophisticated solution when I could just stream my data.