Converter Model#

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

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

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

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

get_attr(attr)[fuente]#

Gets a mapped attribute.

Parámetros:

attr (str) – The attribute to get.

Devuelve:

The mapped attribute.

Tipo del valor devuelto:

str

get_attrs()[fuente]#

Gets a list of mapped attributes.

Devuelve:

The list of mapped attributes.

Tipo del valor devuelto:

list

property ref: Any#

Gets the «referenced» model, or first.

Devuelve:

The referenced model.

Tipo del valor devuelto:

object

property difference: List[dict]#

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

Devuelve:

A list of dictionaries

Tipo del valor devuelto:

List[dict]

property missing: List[dict]#

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

Devuelve:

A list of dictionaries

Tipo del valor devuelto:

List[dict]