From time to time I need a script to query through local files with sparql. It would make it easier for me, if there is a script delivered with rdflib.
Any thoughts on this? are there others that could use such a script?
If there isnt any interest for that here, i think i will just create an extra package on my own for that.
example usage:
>>> local-sparql-query "SELECT ?x WHERE (?x a <http://example.com/MyClass>)" --rdffile myinfo.ttl --print "print('found solution: ', x)"
found solution: <http:example.com/PersonA>
found solution: <http:example.com/PersonB>
>>> local-sparql-query --rdffile myinfo.ttl --rdffile additional-info.tttl --queryfile cool-query.spl --only-first-result
{X: <http:example.com/PersonA>, name: "SomeName"}