summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorGunnar Aastrand Grimnes <gromgull@gmail.com>2016-11-21 14:58:39 +0100
committerGunnar Aastrand Grimnes <gromgull@gmail.com>2017-01-30 17:43:04 +0100
commit8bf3523652614337b8b2a12ff9820caeff74a2eb (patch)
tree50873d0fe00248f8801762fdb0dd98ed0644386b /examples
parent25fe5ed2064cceb0661a5df82f75145f002a5f12 (diff)
downloadrdflib-8bf3523652614337b8b2a12ff9820caeff74a2eb.tar.gz
tagged sparqlstore as converted and fixed example
Diffstat (limited to 'examples')
-rw-r--r--examples/sparqlstore_example.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/examples/sparqlstore_example.py b/examples/sparqlstore_example.py
index 4f828913..529ee233 100644
--- a/examples/sparqlstore_example.py
+++ b/examples/sparqlstore_example.py
@@ -10,12 +10,15 @@ if __name__ == '__main__':
dbo = Namespace('http://dbpedia.org/ontology/')
- graph = Graph('SPARQLStore')
+ graph = Graph('SPARQLStore', identifier="http://dbpedia.org")
graph.open("http://dbpedia.org/sparql")
+
pop = graph.value(
URIRef("http://dbpedia.org/resource/Berlin"),
dbo.populationTotal)
+ print(graph.store.queryString)
+
print("According to DBPedia Berlin has a population of", pop)