Converter Model#

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

A class representing the «conversion» or consistent mapping between two objects” attributes.

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

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

get_attr(attr)[sorgente]#

Gets a mapped attribute.

Parametri:

attr (str) – The attribute to get.

Ritorna:

The mapped attribute.

Tipo di ritorno:

str

get_attrs()[sorgente]#

Gets a list of mapped attributes.

Ritorna:

The list of mapped attributes.

Tipo di ritorno:

list

property ref: Any#

Gets the «referenced» model, or first.

Ritorna:

The referenced model.

Tipo di ritorno:

object

property difference: List[dict]#

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

Ritorna:

A list of dictionaries

Tipo di ritorno:

List[dict]

property missing: List[dict]#

Gets a list of keys and values missing from the «referenced» or first model.

Ritorna:

A list of dictionaries

Tipo di ritorno:

List[dict]