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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file wikidata_plain_sparql-0.0.1.tar.gz.
File metadata
- Download URL: wikidata_plain_sparql-0.0.1.tar.gz
- Upload date:
- Size: 2.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
32cb6db8afa742aba850e36dbc1cdc81c907484f0e3a88ff875cd4c5f8a0458a
|
|
| MD5 |
e2fd7f5e1f90cd8e8dc1a00afd0db379
|
|
| BLAKE2b-256 |
9ec75940b729b2eee2d76e350b05b4aca36b515a58fa3b39e7e82605246d9e2e
|
File details
Details for the file wikidata_plain_sparql-0.0.1-py3-none-any.whl.
File metadata
- Download URL: wikidata_plain_sparql-0.0.1-py3-none-any.whl
- Upload date:
- Size: 3.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
79bd34b9ff3f962c609038171382e0b92ea5d17c605cc237f84eb45065bc0e58
|
|
| MD5 |
1661e79b4d1601293687f994c021c606
|
|
| BLAKE2b-256 |
29f03627c8ddb37cdd7d4be066f65d633029b90c60e3dc2deb78bc6273e92913
|