Architecture of Information Systems Search Engine
John Samuel
CPE Lyon
Year: 2017-2018
Email: john(dot)samuel(at)cpe(dot)fr
import requests
url = "https://api.github.com/"
response = requests.get(url)
print(response.json())
from SPARQLWrapper import SPARQLWrapper, JSON
sparql = SPARQLWrapper("http://query.wikidata.org/sparql")
sparql.setQuery("""
SELECT ?item WHERE {
?item wdt:P31 wd:Q9143;
}
LIMIT 10
""")
sparql.setReturnFormat(JSON)
results = sparql.query().convert()
for result in results["results"]["bindings"]:
print(result)