Changelog¶
Version 0.10.0¶
To be released.
Version 0.9.0¶
Released on October 31, 2025.
Extended Python version support to 3.8–3.14.
Added
user_agentparameter toClientconstructor. Now API requests include aUser-Agentheader to comply with Wikidata API authentication requirements. [#64]Migrated build configuration from
setup.py/setup.cfgtopyproject.tomlfollowing modern Python packaging standards (PEP 518, PEP 621).Updated mypy configuration to use Python 3.9 as the target version for type checking.
Fixed typing annotation for
user_agentparameter inClientconstructor to be non-optional.Improved code style and import organization throughout the codebase.
Version 0.8.0 & 0.8.1¶
Released on July 7, 2024.
Python 3.4–3.7 are no more supported. The minimum supported Python version is Python 3.8. Instead, now it’s tested with Python 3.8–3.11.
EntityandClientbecame possible to be serialized usingpickle. [#31]Fixed a typing bug that
Entity.labelandEntity.descriptionproperties were incorrectly typed.wikidata.multilingual.MultilingualText’s constructor became to take onlyLocalefor parameterlocale.Added date precision 7 in
wikidata.datavalue.decoder. [#59 by Baptiste Bayche]Added date precision 10 in
wikidata.datavalue.decoder. [#60 by David Doukhan]
Version 0.7.0¶
Released on July 31, 2020.
Marked the package as supporting type checking by following PEP 561.
Now non-existent entities became able to be handled. [#11]
Added
EntityStateenum class.Added
Entity.stateattribute.Fixed a bug that raised
HTTPErrorwhen non-existentEntitywas requested.
Languages (locales) became no more represented as
babel.core.Locale, but representedwikidata.multilingual.Localeinstead. [#2, #27, #30 by Nelson Liu]Removed Babel from the dependencies.
Added
wikidata.multilingual.Localetype.To replace the
babel.core.Localetype, thewikidata.multilingual.Localetype has been aliased to str. This is a breaking change for all Wikidata public API functions that formerly returned or ingestedbabel.core.Locale.
Added support for
timedatatypes with precision 9 (year-only). [#26 by Nelson Liu]Added support for globe coordinate datatype. [#28 by Nelson Liu]
Added support for decoding the
globe-coordinatedatatype.Added
wikidata.globecoordinatemodule.
Added support for quantity datatype. [#29 by Nelson Liu]
Added support for decoding the
quantitydatatype.Added
wikidata.quantitymodule. [#29]
Fixed
KeyErrorfromEntity.getlist()if the property is explicitly associated with “no value”. [#18]Fixed a bug that raised
KeyErrorwhen accessing an image more than once andMemoryCachePolicywas enabled. [#24 by Héctor Cordobés]
Version 0.6.1¶
Released on September 18, 2017.
Fixed
ImportErroron Python 3.4 due to lack oftypingmodule. [#4]
Version 0.6.0¶
Released on September 12, 2017.
Fixed
KeyErrorfromClient.get()on an entity is redirected to its canonical entity.
Version 0.5.4¶
Released on September 18, 2017.
Fixed
ImportErroron Python 3.4 due to lack oftypingmodule. [#4]
Version 0.5.3¶
Released on June 30, 2017.
Fixed
ValueErrorfromEntity.label/Entity.descriptionwith languages ISO 639-1 doesn’t cover (e.g.cbk-zam). [#2]Although this fix prevents these properties from raising
ValueError, it doesn’t completely fix the problem.babel.core.Localetype, which Wikidata depends on, currently doesn’t supprot languages other than ISO 639-1. In order to completely fix the problem, we need to patch Babel to support them, or make Wikidata independent from Babel.
Version 0.5.2¶
Released on June 28, 2017.
Fixed
AssertionErrorfrom emptymultilingual_attributes.
Version 0.5.1¶
Released on June 28, 2017.
Fixed
AssertionErrorfromlen()or iterating (iter()) onEntityobjects with empty claims.
Version 0.5.0¶
Released on June 13, 2017.
Wikidata API calls over network became possible to be cached.
Clientnow hascache_policyattribute and constructor option. Nothing is cached by default.Added
wikidata.cachemodule andCachePolicyinterface in it. Two built-in implementation of the interface were added:NullCachePolicyNo-op.
MemoryCachePolicyLRU cache in memory.
ProxyCachePolicyProxy/adapter to another proxy object. Useful for utilizing third-party cache libraries.
wikidata.client.Client.requestlogger became to record logs about cache hits asDEBUGlevel.
Version 0.4.4¶
Released on June 30, 2017.
Fixed
ValueErrorfromEntity.label/Entity.descriptionwith languages ISO 639-1 doesn’t cover (e.g.cbk-zam). [#2]Although this fix prevents these properties from raising
ValueError, it doesn’t completely fix the problem.babel.core.Localetype, which Wikidata depends on, currently doesn’t supprot languages other than ISO 639-1. In order to completely fix the problem, we need to patch Babel to support them, or make Wikidata independent from Babel.
Version 0.4.3¶
Released on June 28, 2017.
Fixed
AssertionErrorfrom emptymultilingual_attributes.
Version 0.4.2¶
Released on June 28, 2017.
Fixed
AssertionErrorfromlen()or iterating (iter()) onEntityobjects with empty claims.
Version 0.4.1¶
Released on April 30, 2017.
Fixed
AssertionErrorfromgetlist()on entities with empty claims.
Version 0.4.0¶
Released on April 24, 2017.
Monolingual texts became able to be handled.
Added
MonolingualTexttype which is a true subtype ofstr.
Version 0.3.0¶
Released on February 23, 2017.
Now
Clientbecame able to customize how it decodes datavalues to Python objects.Added
wikidata.datavaluemodule andDecoderclass inside it.Added
datavalue_decoderoption toClient.
Now files on Wikimeda Commons became able to be handled.
New decoder became able to parse Wikimedia Commons files e.g. images.
Added
wikidata.commonsmediamodule andFileclass inside it.
The meaning of
Clientconstructor’sbase_urlprameter beccame not to contain the trailing pathwiki/fromhttps://www.wikidata.org/wiki/. As its meaning changed, the value ofWIKIDATA_BASE_URLconstant also changed to not have the trailing path.Added
loadoption toClient.get()method.
Version 0.2.0¶
Released on February 19, 2017.
Made
Entitymultidict. Now it satisfiesMapping[Entity,object] protocol.Added
Entity.typeproperty andEntityTypeenum class to represent it.Added
entity_type_guessoption andguess_entity_type()method toClientclass.Implemented
Hashableprotocol and==/=operators toEntityfor equality test.
Version 0.1.0¶
Initial version. Released on February 15, 2017.