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.1.tar.gz (2.4 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.1-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

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

Hashes for wikidata_plain_sparql-0.0.1.tar.gz
Algorithm Hash digest
SHA256 32cb6db8afa742aba850e36dbc1cdc81c907484f0e3a88ff875cd4c5f8a0458a
MD5 e2fd7f5e1f90cd8e8dc1a00afd0db379
BLAKE2b-256 9ec75940b729b2eee2d76e350b05b4aca36b515a58fa3b39e7e82605246d9e2e

See more details on using hashes here.

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

Hashes for wikidata_plain_sparql-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 79bd34b9ff3f962c609038171382e0b92ea5d17c605cc237f84eb45065bc0e58
MD5 1661e79b4d1601293687f994c021c606
BLAKE2b-256 29f03627c8ddb37cdd7d4be066f65d633029b90c60e3dc2deb78bc6273e92913

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