Skip to content

Expose httpx.Response streaming generators as string literals #46

@lu-pl

Description

@lu-pl

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.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions