You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The feature essentially treats `rdflib.Graph` as a SPARQL endpoint i.e. SPARQL operations are delegated to an in-memory graph object using a custom transport that builds and returns an `httpx.Response`.
337
-
338
-
> Note that response streaming is currently not supported for `rdflib.Graph` targets.
339
-
340
-
#### RDF Source Constructor
341
-
342
-
The `SPARQLWrapper` class features an alternative constructor, `sparqlx.SPARQLWrapper.from_rdf_source`, that, given a `sparqlx.types.RDFParseSource`, parses the RDF source into an `rdflib.Graph` and returns a `SPARQLWrapper` instance targeting that graph object.
343
-
kwargs are forwarded to the rdflib.Graph.parse methods.
The `json_result_iterator` generator yields Python dictionaries holding SPARQL JSON response bindings coming from a byte stream. Buffering and incremental parsing is done by `ijson`.
416
-
417
-
### Graph Response Streaming
418
-
419
-
The following example processes a stream of RDF graph data coming from a SPARQL CONSTRUCT response.
420
-
421
-
It uses an Iterator chunking facility `ichunk` to implement a generator that yields sized sub-graphs from a streamed graph response.
422
-
To avoid incremental RDF parsing and possibly skolemization, `ntriples` are requested with line-based streaming.
The feature essentially treats `rdflib.Graph` as a SPARQL endpoint i.e. SPARQL operations are delegated to an in-memory graph object using a custom transport that builds and returns an `httpx.Response`.
22
+
23
+
> Note that response streaming is currently not supported for `rdflib.Graph` targets.
24
+
25
+
### RDF Source Constructor
26
+
27
+
The `SPARQLWrapper` class features an alternative constructor, `sparqlx.SPARQLWrapper.from_rdf_source`, that, given a `sparqlx.types.RDFParseSource`, parses the RDF source into an `rdflib.Graph` and returns a `SPARQLWrapper` instance targeting that graph object.
28
+
kwargs are forwarded to the rdflib.Graph.parse methods.
The `json_result_iterator` generator yields Python dictionaries holding SPARQL JSON response bindings coming from a byte stream. Buffering and incremental parsing is done by `ijson`.
44
+
45
+
## Graph Response Streaming
46
+
47
+
The following example processes a stream of RDF graph data coming from a SPARQL CONSTRUCT response.
48
+
49
+
It uses an Iterator chunking facility `ichunk` to implement a generator that yields sized sub-graphs from a streamed graph response.
50
+
To avoid incremental RDF parsing and possibly skolemization, `ntriples` are requested with line-based streaming.
0 commit comments