Skip to main content

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

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

wikidata_plain_sparql-0.0.3.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wikidata_plain_sparql-0.0.3-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file wikidata_plain_sparql-0.0.3.tar.gz.

File metadata

  • Download URL: wikidata_plain_sparql-0.0.3.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.6

File hashes

Hashes for wikidata_plain_sparql-0.0.3.tar.gz
Algorithm Hash digest
SHA256 5eb9cbda0a5203a03c5270c1ac3e54f9f620f3cfb4e27ac3cca47ee0589c2b76
MD5 a182340764b64ca96caa645cd6847b68
BLAKE2b-256 dd9562e5b568a7826f959f5431cba76bcb71dca2073809fd6b161f303a1749c2

See more details on using hashes here.

File details

Details for the file wikidata_plain_sparql-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: wikidata_plain_sparql-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.6

File hashes

Hashes for wikidata_plain_sparql-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ef25458d30d990ad5a27e05ae1e4dcb32a43833097c757363777f3044bb0181d
MD5 361c4df16e42b39c94ee1216bfb9d232
BLAKE2b-256 db5362ab52c08bff7e9cc8cb3189dc6d3902dab0d673b0ac747e5d12f0904460

See more details on using hashes here.

Supported by

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