Skip to main content

Wikidata client library

Project description

Latest PyPI version Documentation Status GitHub Actions

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.9.0.tar.gz (26.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-0.9.0-py3-none-any.whl (44.1 kB view details)

Uploaded Python 3

File details

Details for the file wikidata-0.9.0.tar.gz.

File metadata

  • Download URL: wikidata-0.9.0.tar.gz
  • Upload date:
  • Size: 26.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for wikidata-0.9.0.tar.gz
Algorithm Hash digest
SHA256 059e4e9574aa2a03e4327d28df8c0cc661db2826a75900cda0142bdc01b4bb7f
MD5 b7fd12fc6060d8c83245ef1de5d75721
BLAKE2b-256 c6da59fe9524010a37eafd06673f87783a7440a8cf2606ac7b214dae1ba5fa39

See more details on using hashes here.

File details

Details for the file wikidata-0.9.0-py3-none-any.whl.

File metadata

  • Download URL: wikidata-0.9.0-py3-none-any.whl
  • Upload date:
  • Size: 44.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for wikidata-0.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3e908cecf9fab177393034ccac759fbdb79b9389b32b4f1a2cc556fac3a25895
MD5 74411e16ca0ea8bc48ba61300b9b4228
BLAKE2b-256 98f4101b2fa3b57641f52a7d83c103d5bb18899122299d456fc2d8783e351148

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