summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorgromgull <gromgull@gmail.com>2012-07-11 14:43:29 +0200
committergromgull <gromgull@gmail.com>2012-07-11 14:43:29 +0200
commit40b3cb12662660ca27eaadd4b93ffc641f985337 (patch)
tree6629b02c34c9aee6046f6b39e8b5bb71d52dbcbf /docs
parent900bbf11eb9d988286d8ba02bb842c271d2d9196 (diff)
downloadrdflib-40b3cb12662660ca27eaadd4b93ffc641f985337.tar.gz
minor doc update
Diffstat (limited to 'docs')
-rw-r--r--docs/intro_to_sparql.rst10
1 files changed, 1 insertions, 9 deletions
diff --git a/docs/intro_to_sparql.rst b/docs/intro_to_sparql.rst
index 1dde3e35..3745139d 100644
--- a/docs/intro_to_sparql.rst
+++ b/docs/intro_to_sparql.rst
@@ -37,21 +37,13 @@ In order to perform SPARQL queries, you need to install the companion ``rdfextra
$ easy_install rdfextras
-In order to use the SPARQL plugin in your code, the plugin must first be registered. This binds the the imported SPARQL query processor implementation to the :meth:`rdflib.graph.Graph.query` method, which can then be passed a SPARQL query (a string). When called, the :meth:`~rdflib.graph.Graph.query` method returns a SPARQLQuery object whose ``result`` attribute is a list of results.
+If installed with setuptools this automatically binds the the imported SPARQL query processor implementation to the :meth:`rdflib.graph.Graph.query` method, which can then be passed a SPARQL query (a string). When called, the :meth:`~rdflib.graph.Graph.query` method returns a SPARQLQuery object whose ``result`` attribute is a list of results.
Continuing the example...
.. code-block:: python
import rdflib
- from rdflib import plugin
-
- plugin.register(
- 'sparql', rdflib.query.Processor,
- 'rdfextras.sparql.processor', 'Processor')
- plugin.register(
- 'sparql', rdflib.query.Result,
- 'rdfextras.sparql.query', 'SPARQLQueryResult')
qres = g.query(
"""SELECT DISTINCT ?aname ?bname