diff options
| author | gromgull <gromgull@gmail.com> | 2012-07-11 14:43:29 +0200 |
|---|---|---|
| committer | gromgull <gromgull@gmail.com> | 2012-07-11 14:43:29 +0200 |
| commit | 40b3cb12662660ca27eaadd4b93ffc641f985337 (patch) | |
| tree | 6629b02c34c9aee6046f6b39e8b5bb71d52dbcbf /docs | |
| parent | 900bbf11eb9d988286d8ba02bb842c271d2d9196 (diff) | |
| download | rdflib-40b3cb12662660ca27eaadd4b93ffc641f985337.tar.gz | |
minor doc update
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/intro_to_sparql.rst | 10 |
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 |
