def query_sparql_endpoint(sparql_endpoint, query=all_data_q): graph = rdflib.ConjunctiveGraph('SPARQLStore') rt = graph.open(sparql_endpoint) rs = graph.query(query) return rs