Skip to main content

Wikidata client library

Project description

Latest PyPI version Documentation Status Build Status

This package provides easy APIs to use Wikidata for Python.

>>> from wikidata.client import Client
>>> client = Client()  # doctest: +SKIP
>>> entity = client.get('Q20145', load=True)
>>> entity
<wikidata.entity.Entity Q20145 'IU'>
>>> entity.description
m'South Korean singer and actress'
>>> image_prop = client.get('P18')
>>> image = entity[image_prop]
>>> image
<wikidata.commonsmedia.File 'File:KBS "The Producers" press conference, 11 May 2015 10.jpg'>
>>> image.image_resolution
(820, 1122)
>>> image.image_url

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for Wikidata, version 0.7.0
Filename, size File type Python version Upload date Hashes
Filename, size Wikidata-0.7.0-py3-none-any.whl (29.3 kB) File type Wheel Python version 3.7 Upload date Hashes View
Filename, size Wikidata-0.7.0.tar.gz (13.2 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page