Hi everyone,
I've tried to implement SPARQL 1.1 for RDFLib:
https://github.com/gromgull/rdflib-sparql
At the moment, the query part is pretty much "done", according to the
DAWG compliance tests. This means, all SPARQL 1.1 features, like
aggregates, property-paths, sub-queries, etc. should work.
A handful of tests are skipped, either because I've not implemented
the feature (federated queries, entailment) or because the fixes are
depending on
https://github.com/RDFLib/rdflib/issues/196
I've not spent any time trying to optimise the thing, i.e. most things
are implemented as naively and straight-forward as possible.
Now I would love some help testing the thing on real world
data/queries! So if you have a minute, try it! I would appreciate any
sort of comments!
One thing that is not quite SPARQL, but very neat is that the
PropertyPaths are also usable outside the SPARQL Engine, see the
docstring/test here:
https://github.com/gromgull/rdflib-sparql/blob/master/rdflib_sparql/paths.py
and
https://github.com/gromgull/rdflib-sparql/blob/master/examples/foafpaths.py
(In the not-very-long run I would also like to merge this into core
rdflib of course!)
Cheers,
- Gunnar
--
http://gromgull.net