Query WikiData in plain SPARQL
Project description
WikiData Plain SPARQL Client
This package allows to query the WikiData database. For example this package is intended for people who need to be able to query WikiData in plain SPARQL while staying whithin a Jupyter Notebook.
Install
pip install wikidata_plain_sparql
Usage
The module only has one function which is named query:
# import the module
import wikidata_plain_sparql as wikidata
# query WikiData
wikidata.query('''
SELECT ?actor ?actorLabel
WHERE
{
# Person of Interest has actor
wd:Q564345 wdt:P161 ?actor.
# actor has won a Golden Globe Award
?actor wdt:P166 wd:Q1011547.
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
''')
Which will result in the following pandas data frame:
actor | actorLabel |
---|---|
http://www.wikidata.org/entity/Q3295000 | Sterling K. Brown |
Credits
- @jelleschutter - Development
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
Built Distribution
Close
Hashes for wikidata_plain_sparql-0.0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c65317e295829337ab0a1008e4cb871fa9c7c3820659ca76508dd5ffec3d4b37 |
|
MD5 | a0be9a684f11a0e3e3ecc7d55b8995c0 |
|
BLAKE2b-256 | eeaa77c1b361db65100d63365cab246ebfed9929827fcc6fa846cd124b64ab0a |
Close
Hashes for wikidata_plain_sparql-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b6e6a497eeda910b76410cb0b23a814e2c3a2c8c2714dd229a6f4cd6dfc225a2 |
|
MD5 | 7121770a684778aeab322b364512d8ba |
|
BLAKE2b-256 | 283af5fee5d4c83e3af1881657fe85254086e6357e7873d6e864e9d9c189a870 |