Skip to main content

python wikidata access via dicts

Project description

py_ez_wikidata

Mapping for Wikidata allows simplified / easy creation of wikidata entries from dicts

Join the discussion at https://github.com/WolfgangFahl/py_ez_wikidata/discussions pypi Github Actions Build PyPI Status GitHub issues GitHub closed issues API Docs License

Docs

Wiki

CLI (ezwd)

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

Search

ezwd -s "Robert David"

Inspect a mapping

ezwd -m scholar --list-mappings

Create from a 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

The example above created Q140424194 (instance of human, with ORCID, DBLP and LinkedIn). Only add 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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

py_ez_wikidata-0.4.2.tar.gz (175.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

py_ez_wikidata-0.4.2-py3-none-any.whl (161.1 kB view details)

Uploaded Python 3

File details

Details for the file py_ez_wikidata-0.4.2.tar.gz.

File metadata

  • Download URL: py_ez_wikidata-0.4.2.tar.gz
  • Upload date:
  • Size: 175.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for py_ez_wikidata-0.4.2.tar.gz
Algorithm Hash digest
SHA256 3d9c1fee33fe15514d4bed2f8fe212901c3d38403b8ebf3f3f3e769ddfed2f64
MD5 1ce2567c2dba1a36d5df0c9701900c04
BLAKE2b-256 e038dbfcab91e2d8da62ed7c167b07760467695fb6c11d023e08ca4be586b810

See more details on using hashes here.

Provenance

The following attestation bundles were made for py_ez_wikidata-0.4.2.tar.gz:

Publisher: upload-to-pypi.yml on WolfgangFahl/py_ez_wikidata

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file py_ez_wikidata-0.4.2-py3-none-any.whl.

File metadata

  • Download URL: py_ez_wikidata-0.4.2-py3-none-any.whl
  • Upload date:
  • Size: 161.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for py_ez_wikidata-0.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8f98ca2cd3428418acf4cb1fb08834bd999f125d2aa302033d1186e6fe5f26fd
MD5 bef2de714e1baa5f9c4eec0477028303
BLAKE2b-256 9f7e091d2a98f9c939b1c85bfd099fdce9f1aca7c7cbaf0ba78592fc01b4aed2

See more details on using hashes here.

Provenance

The following attestation bundles were made for py_ez_wikidata-0.4.2-py3-none-any.whl:

Publisher: upload-to-pypi.yml on WolfgangFahl/py_ez_wikidata

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page