This is an old revision of the document!


Table of Contents

WikibaseIntegrator

WikibaseIntegrator is a python package designed to interact with Wikibase. It's a fork of WikidataIntegrator.

Clone

git clone --recursive https://github.com/LeMyst/WikibaseIntegrator

Perform operations inside the repository directory.

cd WikibaseIntegrator

Install

python3 -m venv ~/.venvs/wikibaseintegrator
~/.venvs/wikibaseintegrator/bin/python -m pip install --upgrade pip setuptools
~/.venvs/wikibaseintegrator/bin/python -m pip install .

Test

vi human.py
from wikibaseintegrator import WikibaseIntegrator

wbi = WikibaseIntegrator()
my_first_wikidata_item = wbi.item.get(entity_id='Q5')

# to check successful installation and retrieval of the data, you can print the json representation of the item
print(my_first_wikidata_item.get_json())
~/.venvs/wikibaseintegrator/bin/python human.py
WARNING: Please set an user agent if you interact with a Wikibase instance from the Wikimedia Foundation.
More information in the README.md and https://foundation.wikimedia.org/wiki/Policy:User-Agent_policy
...
This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies