As an example, we will write a bot to keep pharmaceutical products and their therapeutic areas (downloaded from EMA) updated.

See here for an example: https://www.wikidata.org/wiki/Q29003737#P4044

The data file is made using: https://github.com/stuppie/ema/tree/master/scrape, but is out of scope for this tutorial

Core properties

WDI allows you to define core properties which should have unique values across all of Wikidata. WDI will automatically check that these are unique and throw exceptions on failure. These core props are also used to retrieve items if the QID is not known.

You can add to the core properties by defining another, as below

Removing deprecated statements