# install qlever
pip install qlever
# check qlever command
qlever
# enable bash completion
eval "$(register-python-argcomplete qlever)" && export QLEVER_ARGCOMPLETE_ENABLED=1 #
# create working directory for QLever
mkdir test
cd test
wget https://github.com/systemsomicslab/MassBank-RDF/raw/main/Qleverfile
wget DOWNLOAD_YOUR_TTLFILES.ttl
qlever index
qlever start
qlever ui
mkdir test2
cd test2
wget https://github.com/systemsomicslab/MassBank-RDF/raw/main/Qleverfile
wget DOWNLOAD_YOUR_TTLFILES.ttl
qlever index
qlever start --kill-existing-with-same-port
qlever ui
pip install jupyterlab
pip install sparqlwrapper
jupyter-lab
from SPARQLWrapper import SPARQLWrapper, JSON
URL4SPARQLENDPIOINT = "YOUR_QLEVER_SPARQL_ENDPOINT"
sparql = SPARQLWrapper(URL4SPARQLENDPIOINT)
sparql.setQuery(query)
sparql.setReturnFormat(JSON)
results = sparql.query().convert()
for result in results["results"]["bindings"]:
print(result)