wikibaseintegrator.models.references

class wikibaseintegrator.models.references.Reference(snaks=None, snaks_order=None)[source]

Bases: BaseModel

Parameters:
  • snaks (Snaks | None) –

  • snaks_order (list | None) –

__init__(snaks=None, snaks_order=None)[source]
Parameters:
  • snaks (Snaks | None) –

  • snaks_order (list | None) –

add(snak=None, action_if_exists=ActionIfExists.REPLACE_ALL)[source]
Return type:

Reference

Parameters:
from_json(json_data)[source]
Return type:

Reference

Parameters:

json_data (dict[str, Any]) –

get_json()[source]
Return type:

dict[str, dict | list]

property hash
property snaks
property snaks_order
class wikibaseintegrator.models.references.References[source]

Bases: BaseModel

__init__()[source]
Return type:

None

add(reference=None, action_if_exists=ActionIfExists.REPLACE_ALL)[source]
Return type:

References

Parameters:
clear()[source]
Return type:

References

from_json(json_data)[source]
Return type:

References

Parameters:

json_data (list[dict]) –

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

Reference | None

Parameters:

hash (str | None) –

get_json()[source]
Return type:

list[dict]

property references: list[wikibaseintegrator.models.references.Reference]
remove(reference_to_remove)[source]
Return type:

bool

Parameters:

reference_to_remove (Claim | Reference) –