Fields¶
BooleanField¶
-
class
highton.fields.boolean_field.BooleanField(name, required=False)[source]¶ The BooleanField represents a field which value will be parsed to Highrise specific boolean format
-
FALSE= 'false'¶
-
MAPPING= {False: 'false', True: 'true'}¶
-
TRUE= 'true'¶
-
decode(element)[source]¶ Parameters: element (xml.etree.ElementTree.Element) – the element which needs to be parsed Returns: datetime.date Return type: the parsed date object
-
to_serializable_value()¶ Parse the value to a serializable pythonic value Default: Just return the value
Returns: Return type: Any
-
DateField¶
-
class
highton.fields.date_field.DateField(name, required=False)[source]¶ The DateField represents a field which value will be parsed to Highrise specific date format
-
DATE_FORMAT= '%Y-%m-%d'¶
-
decode(element)[source]¶ Parameters: element (xml.etree.ElementTree.Element) – the element which needs to be parsed Returns: datetime.date Return type: the parsed date object
-
to_serializable_value()¶ Parse the value to a serializable pythonic value Default: Just return the value
Returns: Return type: Any
-
DateTimeField¶
-
class
highton.fields.datetime_field.DatetimeField(name, required=False)[source]¶ -
DATETIME_FORMAT= '%Y-%m-%dT%H:%M:%SZ'¶
-
decode(element)[source]¶ Parameters: element (xml.etree.ElementTree.Element) – the element which needs to be parsed Returns: the parsed datetime object Return type: datetime.datetime
-
to_serializable_value()¶ Parse the value to a serializable pythonic value Default: Just return the value
Returns: Return type: Any
-
Field¶
-
class
highton.fields.field.Field(name, required=False)[source]¶ This is an abstract class for a field, which makes the base for an encode and decode method
Variables: - name – name of the field which needed to serialize this field to a xml object
- required – if the field is required when you create or update an object
- value – the value of the field
-
decode(element)[source]¶ Decodes the value of the element
Parameters: element – Returns: Return type:
IntegerField¶
-
class
highton.fields.integer_field.IntegerField(name, required=False)[source]¶ -
decode(element)[source]¶ Parameters: element (xml.etree.ElementTree.Element) – Returns: the parsed int object Return type: int
-
to_serializable_value()¶ Parse the value to a serializable pythonic value Default: Just return the value
Returns: Return type: Any
-
ListField¶
-
class
highton.fields.list_field.ListField(name, init_class)[source]¶ The ListField parses the init_class objects in a list
Variables: init_class – a Highton model -
decode(element)[source]¶ Parameters: element – Returns: the parsed list with init_class objects Return type: list
-
ObjectField¶
-
class
highton.fields.object_field.ObjectField(name, init_class)[source]¶ The ObjectFIeld parses the init_class object
Variables: init_class – a Highton model -
decode(element)[source]¶ Decodes the value of the element
Parameters: element – Returns: Return type:
-
StringField¶
-
class
highton.fields.string_field.StringField(name, required=False)[source]¶ -
decode(element)¶ Decodes the value of the element
Parameters: element – Returns: Return type:
-
encode()¶ Encodes the value of the field and put it in the element also make the check for nil=true if there is one
Returns: returns the encoded element Return type: xml.etree.ElementTree.Element
-
to_serializable_value()¶ Parse the value to a serializable pythonic value Default: Just return the value
Returns: Return type: Any
-