Converter Model#

class interactions.ext.converter.Converter(_Converter__obj1, _Converter__obj2)[Quellcode]#

A class representing the „conversion“ or consistent mapping between two objects‘ attributes.

Variablen:
  • _obj1 (object) – The first object to be converted.

  • _obj2 (object) – The second object to be converted.

get_attr(attr)[Quellcode]#

Gets a mapped attribute.

Parameter:

attr (str) – The attribute to get.

Rückgabe:

The mapped attribute.

Rückgabetyp:

str

get_attrs()[Quellcode]#

Gets a list of mapped attributes.

Rückgabe:

The list of mapped attributes.

Rückgabetyp:

list

property ref: Any#

Gets the „referenced“ model, or first.

Rückgabe:

The referenced model.

Rückgabetyp:

object

property difference: List[dict]#

Gets a list of keys and values that the models don’t share in common.

Rückgabe:

A list of dictionaries

Rückgabetyp:

List[dict]

property missing: List[dict]#

Gets a list of keys and values missing from the „referenced“ or first model.

Rückgabe:

A list of dictionaries

Rückgabetyp:

List[dict]