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
'https://upload.wikimedia.org/wikipedia/commons/6/60/KBS_%22The_Producers%22_press_conference%2C_11_May_2015_10.jpg'

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-0.4.1.tar.gz (11.0 kB view details)

Uploaded Source

Built Distribution

Wikidata-0.4.1-py3-none-any.whl (13.8 kB view details)

Uploaded Python 3

File details

Details for the file Wikidata-0.4.1.tar.gz.

File metadata

  • Download URL: Wikidata-0.4.1.tar.gz
  • Upload date:
  • Size: 11.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for Wikidata-0.4.1.tar.gz
Algorithm Hash digest
SHA256 eea489edc2e57c0716683bbedebafdacd6d8c754a0e9d8b1dd84d3604192f6af
MD5 6cf174cae83716368171bb14b8dcc554
BLAKE2b-256 9fbc922621d1e287a1a2c9e1e6173148d0e57e40ed2be8dcc922bb9acaea79e0

See more details on using hashes here.

File details

Details for the file Wikidata-0.4.1-py3-none-any.whl.

File metadata

File hashes

Hashes for Wikidata-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3282d2bac394fdcf8aabd6dc2218b315dc38dff915aa731afc60cf9c76f4d08f
MD5 a1156af5548ab0d2a2ddfcd7f52e49d9
BLAKE2b-256 edfec764ade6d232cc086e72d588424786b5782dff8a3ab8eb42b74a9ac735bb

See more details on using hashes here.

Supported by

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