py_ez_wikidata
Mapping for Wikidata allows simplified / easy creation of wikidata entries from dicts
Docs
- Tutorial - mapping, record, dry run, author order and the worked examples
- Wiki - project page and release notes
Install
pip install py-ez-wikidata
CLI (ezwd)
ezwd creates a Wikidata item from a YAML/JSON record via a named property
mapping. It is dry-run by default — add -w to actually write.
ezwd -m scholar --list-mappings # the columns of a mapping
ezwd -m scholar --example # the worked example embedded in the mapping
ezwd -m scholar -r robert_david.yaml --strict # your record as dry-run, exit 1 on problems
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"
This record created Q140424194. Only add an identifier once you have verified it belongs to this exact person.
--format turtle prints the built item as RDF in the Wikidata model,
-s "Robert David" searches Wikidata before you create, --test targets
test.wikidata.org.
Other Wikibases
The mappings carry Wikidata ids. Another Wikibase has its own ids, so
--target translates them with the target's table in
ez_wikidata/resources/targets/<name>.yaml; the targets are listed in
ez_wikidata/resources/wikibases.yaml.
ezwd -m scholar --example --test # test.wikidata.org: P31→P82, Q5→Q497
ezwd -m scholar --example --target factgrid # FactGrid: P31→P2, P496→P408, Q5→Q7
ezwd -s "Human" --target factgrid # search the target, not Wikidata
A property without id on the target is reported and its column skipped, e.g.
no id for P2456 (DBLP author ID) on factgrid - dblp is skipped; --strict
turns this into exit code 1. The FactGrid table is derived from FactGrid's
P343 (Wikidata property). --baseurl translates only if a bundled target has
that baseurl, otherwise it reports that the Wikidata ids are used.
See issue #20.
Bundled mappings
| name | creates | example |
|---|---|---|
scholar |
human (Q5) with scholarly identifiers | Q140424194 |
paper |
scholarly article (Q13442814), authors in their order | Q141609355 |
proceedings |
CEUR-WS proceedings volume (Q1143604) | Q141623730 |
event |
event of a CEUR-WS volume, class from the record | Q141623731 |
extension |
MediaWiki extension (Q6805426) | Q140770649 |
Every mapping file carries the record of its example in its header, how this works and all five examples are in the tutorial.
Metadata
Release files for py-ez-wikidata 0.5.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| py_ez_wikidata-0.5.5.tar.gz | 190.9 kB | With provenance | Details for py_ez_wikidata-0.5.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| py_ez_wikidata-0.5.5-py3-none-any.whl | Python 3 | none | any | Details for py_ez_wikidata-0.5.5-py3-none-any.whl |
Total release size: 366.4 kB
Release files / py_ez_wikidata-0.5.5.tar.gz
| Download URL | py_ez_wikidata-0.5.5.tar.gz |
|---|---|
| Size | 190.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4d8d84c6ab94c14b6368608cd8e284b14149cbd56087309060f0fab2904418ab
|
|
BLAKE2b-256 checksum How to use checksums |
60d0ff24968d36a82a8e4e808f197b647e53f145896f45c2e424f5ecabed9d01
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 26, 2026.
Transparency logRelease files / py_ez_wikidata-0.5.5-py3-none-any.whl
| Download URL | py_ez_wikidata-0.5.5-py3-none-any.whl |
|---|---|
| Size | 175.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0ef697f50583b2177ac06b442b21ae77affd394dd66affce64c2b9e2b082ab6c
|
|
BLAKE2b-256 checksum How to use checksums |
46d3892fa0ab9137517702e930ea3b4bae192012da4e5de937826a0e3cc1a4bd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 26, 2026.
Transparency logSecurity for py-ez-wikidata 0.5.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for py_ez_wikidata-0.5.5.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 26, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.