SPARQLWrapper and Snorql

23 views
Skip to first unread message

xu....@gmail.com

unread,
May 12, 2017, 12:15:29 PM5/12/17
to rdflib-dev
Good afternoon,
I'm working with your library SPARQLWrapper in order to collect metadata about Learning Resources.
Some of the endpoints available online are SNORQL Endpoint (http://comete.licef.ca/snorql/ for example), and SPARQLWrapper does not seem to manage this type of endpoint.
Do you have an idea ?

Here is my script :

from SPARQLWrapper import SPARQLWrapper, JSON

sparql = SPARQLWrapper("http://comete.licef.ca/snorql/")
sparql.setQuery("""
SELECT DISTINCT ?class
WHERE {?s a ?class }
LIMIT 100
""")
sparql.setReturnFormat(JSON)
results = sparql.query().convert()
for result in results["results"]["bindings"]:
print (result["class"]["value"])

Thank you for your help,
Clement Xu

Marc-Antoine Parent

unread,
May 12, 2017, 12:27:15 PM5/12/17
to rdfli...@googlegroups.com
You cannot use Snorql directly, but Snorql applications, like RDFLib, use a sparql endpoint internally.
It should be easy to find the sparql endpoint in the javascript; in this case,
--
http://github.com/RDFLib
---
You received this message because you are subscribed to the Google Groups "rdflib-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rdflib-dev+...@googlegroups.com.
To post to this group, send email to rdfli...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rdflib-dev/bdf92f9e-6076-4577-a371-6a59c147707c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages