https://github.com/dahlia/wikidata
  
  
    Wikidata client library for Python 
    https://github.com/dahlia/wikidata
  
ontology python3 wikidata
        Last synced: 6 months ago 
        JSON representation
    
Wikidata client library for Python
- Host: GitHub
- URL: https://github.com/dahlia/wikidata
- Owner: dahlia
- License: gpl-3.0
- Created: 2017-02-14T22:03:27.000Z (over 8 years ago)
- Default Branch: main
- Last Pushed: 2024-07-10T07:59:27.000Z (over 1 year ago)
- Last Synced: 2025-05-10T04:47:31.699Z (6 months ago)
- Topics: ontology, python3, wikidata
- Language: Python
- Homepage: https://pypi.org/project/Wikidata/
- Size: 274 KB
- Stars: 355
- Watchers: 9
- Forks: 31
- Open Issues: 15
- 
            Metadata Files:
            - Readme: README.rst
- Contributing: CONTRIBUTING.rst
- License: LICENSE
 
Awesome Lists containing this project
README
          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
>>> entity.description
m'South Korean singer and actress'
>>> image_prop = client.get('P18')
>>> image = entity[image_prop]
>>> image
>>> 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/