Wikidata:Tools/For programmers/zh

This page is a translated version of the page Wikidata:Tools/For programmers and the translation is 22% complete.

Command-line tools

 
Screenshot of wikidata-taxonomy.

Data access libraries

Name Language Wikibase API WDQS JSON dumps
Read Write
wikibase-sdk JavaScript Yes via wikibase-edit Yes via wikibase-dump-filter
Wikidata Toolkit (docs) Java Yes Yes No Yes
WikiClientLibrary (docs, [2]) .NET Yes Yes No Yes[3]
go-wikidata (docs) Go Yes No No No
WikidataR (docs) R Yes QS[1] Yes No
WikidataQueryServiceR (docs) R No No Yes No
JsonDumpReader PHP No No No Yes
sparesults (docs) Rust No No Yes No
Wikidata for Ruby Ruby Yes No No No
  1. While WikidataR doesn't support writing via the Wikibase Action API, it supports writing via QuickStatements.

Python libraries

Name Type hints Wikibase API WDQS JSON dumps
Read Write
Pywikibot (docs) Yes Partial[1] Partial[2] Yes No
Wikibase Integrator (docs) Yes Partial[3] Partial[3] Yes Yes
Wikidata Integrator No Partial Partial Yes No
qwikidata (docs) Yes LDI[4] No Yes Yes
wikidata (docs) Yes LDI[4] No No No
KGTK (docs) No No No No Yes
  1. Pywikibot does not support e.g. wbgetclaims. Also note that a major API change is planned. (phab:T186200)
  2. Pywikibot does not support wbsetqualifier or wbsetreference. (phab:T186198)
  3. 3.0 3.1 There are several API actions not (yet) supported by Wikibase Integrator. ([1])
  4. 4.0 4.1 While qwikidata and the wikidata package don't support the Wikibase Action API, they support the Linked Data Interface.

Batch validation

Wikidata Integrator (Q31743627) is the only one of these libraries that has native support validation of items against entity schemas (code example needed).

Simplifying libraries

The following libraries either simplify an existing API, automatically resolve labels or provide property-specific functions.

Entitree Helper
A JavaScript helper package (using TypeScript) based on wikidata-sdk to easily query and process data.
by Germartin1
Wikipedia Tools (for Humans)
wptools 是一个 python 库,旨在使从 MediaWiki 实例中获取数据、揭露更多的 Wikidata、扩展 Wikimedia API 等变得尽可能容易。因为这是本工具的目标。
by Siznax
wikidatanpm
让查询更容易的 Javascript 库。
by MCheca5
wikirepo
基于 Python 的 Wikidata 框架,便于提取 dataframe。
by AndrewTavis

Data quality

See: Wikidata:WikiProject Schemas#Tools

GraphQL

GraphQL
Development of a GraphQL API inspired by Tpt's original implementation below. There are a bit more features.
GraphQL API
GraphQL API提供与 Wikidata 的内容进行互动的功能。API 的访问地址 URI 是 https://tptools.toolforge.org/wdql.php,它遵循中继规范
by Tpt

Import tools

Catmandu-Wikidata
Perl 软件包,从Wikidata导入实体,以便用 Catmandu ETL 框架进行处理。
by JakobVoss
RaiseWikibase
一个用于快速插入 Wikibase 实例的 Python 工具。RaiseWikibase 1)每小时最多可上传一百万个实体和维基百科,2)直接将数据填入 MariaDB 数据库,3)可以为基于维基百科 API 的封装创建一个机器人账户。
by RShigapov
elastic-wikidata
Simple Python CLI to load subsets of Wikidata into ElasticSearch from a dump or SPARQL query. Automatically paginates SPARQL queries for bulk loading.
by Kdutia
Wikidata Subset Search Engine
配置填充有 Wikidata 子集数据的 ElasticSearch 实例的工具
by Maxlath

Other datasets

QRank
基于 Wikidata 的排名指标。定期根据维基媒体的浏览量进行(重新)计算,可供批量下载。有关介绍,请参阅README文件
by Sascha
Wikidata Lang
一个包含183种语言的 JSON/JS 索引,可通过其两字母语言代码或 Wikidata Qid 进行访问。
by Maxlath

Other

Tool Translate
为社区(The Community, TM)提供一个集中的、用户友好的方式来提供工具的翻译。
by Magnus Manske

See also