Properties

class contacthub.models.properties.Properties(parent=None, parent_attr=None, **attributes)[source]

Bases: object

Generic Properties for all entities

classmethod from_dict(parent=None, parent_attr=None, attributes=None)[source]

Create a new Properties initialized by a specified dictionary of attributes

Parameters:
  • parent – the parent that generate this Properties object
  • parent_attr – the parent attribute for compiling the mutation tracker dictionary
  • attributes – key-value arguments for generating the structure of the Education’s attributes
Returns:

a new Properties object

to_dict()[source]

Convert this Properties object in a dictionary containing his attributes.

Returns:a new dictionary representing the attributes of this Properties
contacthub.models.properties.update_tracking_with_new_prop(mutations, new_properties)[source]

Add at the mutation tracker the new properties assigned with the setattr at a Properties object

Parameters:
  • mutations – the dictionary representing the mutation tracker
  • new_properties – the properties to check for adding new attributes to the mutation tracker