☰

✍️🤖 Agent/Guido: tutorial for py_ez_wikidata 0.5.4 and its ezwd command, see py_ez_wikidata #19.

What ezwd does

ezwd creates a Wikidata item from a record: a small YAML file with a label, a description and one value per column. Which column becomes which Wikidata property is declared in a mapping, a YAML file bundled with the package. The same record and mapping can also be rendered as RDF.

The three commands:

ezwd -m paper --list-mappings      # the columns of a mapping
ezwd -m paper --example            # the worked example embedded in the mapping, as dry run
ezwd -m paper -r paper.yaml --strict   # your own record as dry run, -w writes

Install

pip install py-ez-wikidata

The package depends on WikibaseIntegrator for the Wikidata API, pylodstorage for SPARQL and semantify3 for the examples embedded in the mapping files and the RDF output.

Bundled mappings

name creates example item
scholar human Q5 with scholarly identifiers Q140424194 Robert David
paper scholarly article Q13442814 Q141609355 GraphWiseLearn
proceedings CEUR-WS proceedings volume Q1143604 Q141623730 Vol-4280
event event of a CEUR-WS volume, class from the record Q141623731 CAiSE-RPE 2026
extension MediaWiki extension Q6805426 Q140770649 ImageLink
sandbox test properties of test.wikidata.org

Pages

  1. Mapping - the anatomy of a mapping file
  2. Record - the record and the dedup search
  3. Dry run - preview, checks, RDF, sandbox and the gated write
  4. Author order - the series ordinal as 1-based list index
  5. Examples - the five worked examples and how they are embedded