Page MenuHomePhabricator

Make PyWikibot auto detect sparql query service location from WikibaseManifest installed
Open, Needs TriagePublic

Description

As part of T294892: integraality for Wikibases? it was identified that pywikibot does have some auto detection,

https://gerrit.wikimedia.org/g/pywikibot/core/+/b8c1c1b544bf2ea9a3942b61479fd5ee72a97d54/pywikibot/site/_siteinfo.py#127

But it would be great if it could also make use of WikibaseManifest?

Ideally all Wikibases would run wikibase manifest https://www.mediawiki.org/wiki/Extension:WikibaseManifest
This would provide an easy way for you to lookup wherre the endpoint is, and also what prefixes to use
Again an example on wikibase cloud https://addshore-alpha.wikibase.cloud/w/rest.php/wikibase-manifest/v0/manifest
See local_rdf_namespaces and external_services

As Manifest includes far more than just the sparql URL, it would likely make sense for pywikibot to start the auto detection here