Metadata-Version: 2.1
Name: Wikidata
Version: 0.8.1
Summary: Wikidata client library
Home-page: https://github.com/dahlia/wikidata
Author: Hong Minhee
Author-email: hong.minhee@gmail.com
License: GPLv3 or later
Project-URL: Docs, https://wikidata.readthedocs.io/
Keywords: wikidata ontology
Platform: any
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Information Technology
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Database
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.8.0
Description-Content-Type: text/x-rst; charset=UTF-8
License-File: LICENSE
Requires-Dist: typing ; python_version < "3.5"
Provides-Extra: docs
Requires-Dist: furo ; extra == 'docs'
Requires-Dist: rstcheck ; extra == 'docs'
Requires-Dist: Sphinx ~=6.1.3 ; extra == 'docs'
Provides-Extra: tests
Requires-Dist: flake8 >=6.0.0 ; extra == 'tests'
Requires-Dist: flake8-import-order-spoqa ; extra == 'tests'
Requires-Dist: pytest ~=7.2.1 ; extra == 'tests'
Requires-Dist: mypy >=0.991 ; extra == 'tests'

Wikidata_ client library for Python
===================================

.. image:: https://badge.fury.io/py/Wikidata.svg
   :target: https://pypi.org/project/Wikidata/
   :alt: Latest PyPI version

.. image:: https://readthedocs.org/projects/wikidata/badge/?version=latest
   :target: https://wikidata.readthedocs.io/
   :alt: Documentation Status

.. image:: https://github.com/dahlia/wikidata/actions/workflows/main.yaml/badge.svg?branch=main
   :alt: GitHub Actions
   :target: https://github.com/dahlia/wikidata/actions/workflows/main.yaml

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'

.. _Wikidata: https://www.wikidata.org/
