wikibaseintegrator.models.aliases

class wikibaseintegrator.models.aliases.Alias(language, value=None)[source]

Bases: LanguageValue

Parameters:
  • language (str) –

  • value (str | None) –

__init__(language, value=None)
Parameters:
  • language (str) –

  • value (str | None) –

from_json(json_data)
Return type:

LanguageValue

Parameters:

json_data (dict[str, str]) –

get_json()
Return type:

dict[str, str | None]

property language: str
remove()
Return type:

LanguageValue

property removed: bool
property value: str | None

The value of the LanguageValue instance. :return: A string with the value of the LanguageValue instance.

class wikibaseintegrator.models.aliases.Aliases(language=None, value=None)[source]

Bases: BaseModel

Parameters:
  • language (str | None) –

  • value (str | None) –

__init__(language=None, value=None)[source]
Parameters:
  • language (str | None) –

  • value (str | None) –

property aliases: dict[str, list[wikibaseintegrator.models.aliases.Alias]]
from_json(json_data)[source]
Return type:

Aliases

Parameters:

json_data (dict[str, list]) –

get(language=None)[source]
Return type:

list[Alias] | None

Parameters:

language (str | None) –

get_json()[source]
Return type:

dict[str, list]

set(language=None, values=None, action_if_exists=ActionIfExists.APPEND_OR_REPLACE)[source]
Return type:

Aliases

Parameters:
  • language (str | None) –

  • values (str | list | None) –

  • action_if_exists (ActionIfExists) –