SPARQLWrapper.query_stream and SPARQLWrapper.aquery_stream defines a streaming_method parameter that currently takes a Callable, so e.g. one can pass httpx.Response.iter_lines for line-based streaming.
This, however, requires client code to pass methods defined in httpx and therefor to define httpx as dependency (or use httpx as transient dependency, which should be avoided).
The streaming_method parameter could accept Callable | typing.Literal where Literals should denote an httpx.Response streaming method and are looked up accordingly.
SPARQLWrapper.query_streamandSPARQLWrapper.aquery_streamdefines astreaming_methodparameter that currently takes aCallable, so e.g. one can passhttpx.Response.iter_linesfor line-based streaming.This, however, requires client code to pass methods defined in
httpxand therefor to definehttpxas dependency (or usehttpxas transient dependency, which should be avoided).The
streaming_methodparameter could acceptCallable | typing.Literalwhere Literals should denote anhttpx.Responsestreaming method and are looked up accordingly.