Metadata-Version: 2.1
Name: wikidata-plain-sparql
Version: 0.0.2
Summary: Query WikiData in plain SPARQL
Home-page: https://github.com/jelleschutter/wikidata-plain-sparql
Author: Jelle Schutter
Author-email: jelle@schutter.xyz
License: UNKNOWN
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Description-Content-Type: text/markdown
Requires-Dist: requests

# 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
```bash
pip install wikidata_plain_sparql
```

## Usage
The module only has one function which is named query:
```python
# 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](https://github.com/jelleschutter/) - Development

