def get_primitive_type(attribute_or_data_type): if hasattr(attribute_or_data_type, "type_of_attribute"): data_type = str(attribute_or_data_type.type_of_attribute()) else: data_type = str(attribute_or_data_type) if "" in data_type: return "string" elif "" in data_type: return "float" elif "" in data_type or "" in data_type: return "integer" elif "" in data_type or "" in data_type: return "boolean" elif "