OsProject

OsProject
id  py_ez_wikidata
state  active
owner  WolfgangFahl
title  py_ez_wikidata
url  https://github.com/WolfgangFahl/py_ez_wikidata
version  0.4.2
description  Mapping for Wikidata allows creation of wikidata entries from dicts
date  2026-07-04
since  2024-03-01
until  



Installation

pip install py-ez-wikidata
# alternatively if your pip is not a python3 pip
pip3 install py-ez-wikidata 
# local install from source directory of py-ez-wikidata 
pip install .

upgrade

pip install py-ez-wikidata  -U
# alternatively if your pip is not a python3 pip
pip3 install py-ez-wikidata -U


CLI (ezwd)

The ezwd command creates Wikidata items from a simple YAML/JSON record via a named property mapping. It is dry-run by default — add -w to write.

Search

ezwd -s "Robert David"

Inspect a mapping

ezwd -m scholar --list-mappings

Create from a record

Record robert_david.yaml:

label: Robert David
description: knowledge graph researcher
instanceof: Q5
orcid: "0000-0002-3244-5341"
dblp: "173/3493-1"
linkedInId: "robert-david-39b47692"
# dry-run (nothing written)
ezwd -m scholar -r robert_david.yaml
# write to production Wikidata
ezwd -m scholar -r robert_david.yaml -w

This created Q140424194 for Robert David (instance of human, ORCID, DBLP, LinkedIn). Only include an identifier once you have verified it belongs to this exact person — do not bulk-copy IDs from an author record that may aggregate homonyms.

Endpoint selection

ezwd -m scholar -r robert_david.yaml --test    # target test.wikidata.org
ezwd -m scholar -r robert_david.yaml --baseurl https://www.wikidata.org

Note: test.wikidata.org uses different property / item IDs than production, so a production-PID mapping (like scholar) will not validate there without a test-specific mapping.