Skip to content

v0.5.0 — Wikidata statements and graph queries

Choose a tag to compare

@rustyconover rustyconover released this 13 Nov 14:56
· 12 commits to main since this release

Connect Wikipedia articles to Wikidata structured knowledge and query relationships from SQL.

  • Resolve articles to Wikidata IDs with wiki.main.wiki_entity.
  • Batch entity lookups with labels, descriptions, aliases, sitelinks and revision IDs, including shared mul labels.
  • Read full statements, qualifiers and reference sources through wiki.wikidata.statements, qualifiers and statement_references. Preserve ranks, unknown/no-value semantics, exact quantities, date precision and raw values.
  • Run read-only SPARQL SELECT/ASK queries, including property paths. Results preserve RDF term kind, lexical value, datatype and language.
  • Bound requests and results, honor retry delays, cache responses, and serialize complete scan snapshots across transports.

The existing Wikipedia search and summary functions keep their names and behavior. Includes a runnable fixture/live demo and detailed API documentation.

Validation: 97 non-live tests; stock DuckDB 2.0.0 with signed VGI; Haybarn SQL over subprocess, HTTP and Unix sockets; strict vgi-lint at --fail-on info with zero findings. The installed worker wheel was also exercised outside the source checkout. Live queries worked; public SPARQL availability can vary.

Requires Python 3.13+ and a VGI extension supporting protocol 3.3. The lockfile resolves vgi-python 0.51.1. SPARQL executes at bind time to discover columns, so prepared plans can retain their bound result. This release is a read-only connector, with bounded in-memory results.

Worker code is MIT. Wikipedia article text is CC-BY-SA; Wikidata structured data is CC0. Custom endpoints may have different terms.

Install from this tag using uvx --from git+https://github.com/Query-farm/vgi-wikipedia@v0.5.0 vgi-wikipedia-worker, or use the wheel/source distribution attached by the release workflow. No PyPI publication is configured.