def _api_type ( self , value ) : if isinstance ( value , six . string_types ) : return 'string' elif isinstance ( value , six . integer_types ) : return 'integer' elif type ( value ) is datetime . datetime : return 'date'
how to determine api type python
Returns the API type of the given value based on its python type .
def _api_type(self, value):
        """
        Returns the API type of the given value based on its python type.

        """
        if isinstance(value, six.string_types):
            return 'string'
        elif isinstance(value, six.integer_types):
            return 'integer'
        elif type(value) is datetime.datetime:
            return 'date'