Converter Model#

class interactions.ext.converter.Converter(_Converter__obj1, _Converter__obj2)[स्रोत]#

A class representing the "conversion" or consistent mapping between two objects' attributes.

चर पद :
  • _obj1 (object) -- The first object to be converted.

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

get_attr(attr)[स्रोत]#

Gets a mapped attribute.

मापदण्ड:

attr (str) -- The attribute to get.

प्रदत्त :

The mapped attribute.

प्रदत्त प्रकार :

str

get_attrs()[स्रोत]#

Gets a list of mapped attributes.

प्रदत्त :

The list of mapped attributes.

प्रदत्त प्रकार :

list

property ref: Any#

Gets the "referenced" model, or first.

प्रदत्त :

The referenced model.

प्रदत्त प्रकार :

object

property difference: List[dict]#

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

प्रदत्त :

A list of dictionaries

प्रदत्त प्रकार :

List[dict]

property missing: List[dict]#

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

प्रदत्त :

A list of dictionaries

प्रदत्त प्रकार :

List[dict]