Converter Model#

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

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)[source]#

Gets a mapped attribute.

Parameters:

attr (str) – The attribute to get.

Returns:

The mapped attribute.

Return type:

str

get_attrs()[source]#

Gets a list of mapped attributes.

Returns:

The list of mapped attributes.

Return type:

list

property ref: Any#

Gets the “referenced” model, or first.

Returns:

The referenced model.

Return type:

object

property difference: List[dict]#

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

Returns:

A list of dictionaries

Return type:

List[dict]

property missing: List[dict]#

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

Returns:

A list of dictionaries

Return type:

List[dict]