Skip to main content

A python wrapper to easily query knowledge graphs with SPARQL

Reason this release was yanked:

This version does not inlcude the dependencies

Project description

easysparql

A python wrapper to easily query knowledge graphs with SPARQL

Install

via setuptools

python setup.py

via pip

pip install easysparql

Example

from easysparql.easysparql import run_query, get_entities, get_classes

DBPEDIA_ENDPOINT = "https://dbpedia.org/sparql"

albert_uri = "http://dbpedia.org/resource/Albert_Einstein"
albert_name = "Albert Einstein"
scientist = "http://dbpedia.org/ontology/Scientist"

classes = get_classes(albert_uri, DBPEDIA_ENDPOINT)

entities = get_entities(albert_name, DBPEDIA_ENDPOINT, "@en")

query = "select distinct ?Concept where {[] a ?Concept} LIMIT 100"
results = run_query(query, DBPEDIA_ENDPOINT)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

easysparql-1.0.tar.gz (2.4 kB view hashes)

Uploaded Source

Built Distribution

easysparql-1.0-py2-none-any.whl (7.0 kB view hashes)

Uploaded Python 2

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page