def from_value(self, value):
        """ Function infers TDS type from Python value.

        :param value: value from which to infer TDS type
        :return: An instance of subclass of :class:`BaseType`
        """
        if value is None:
            sql_type = NVarCharType(size=1)
        else:
            sql_type = self._from_class_value(value, type(value))
        return sql_type
def from_value ( self , value ) : if value is None : sql_type = NVarCharType ( size = 1 ) else : sql_type = self . _from_class_value ( value , type ( value ) ) return sql_type
Function infers TDS type from Python value.

        :param value: value from which to infer TDS type
        :return: An instance of subclass of :class:`BaseType`