Create a DataPoint object from data, rather than a JSON object or
        string.  This should be used by user code to construct DataPoints from
        Python-based data like Datetime objects and floats.

        The series_id and key arguments are only necessary if you are doing a
        multi write, in which case those arguments can be used to specify which
        series the DataPoint belongs to.

        If needed, the tz argument should be an Olsen database compliant string
        specifying the time zone for this DataPoint.  This argument is most
        often used internally when reading data from TempoDB.

        :param time: the point in time for this reading
        :type time: ISO8601 string or Datetime
        :param value: the value for this reading
        :type value: int or float
        :param string series_id: (optional) a series ID for this point
        :param string key: (optional) a key for this point
        :param string tz: (optional) a timezone for this point
        :rtype: :class:`DataPoint`

def from_data(self, time, value, series_id=None, key=None, tz=None):
        """Create a DataPoint object from data, rather than a JSON object or
        string.  This should be used by user code to construct DataPoints from
        Python-based data like Datetime objects and floats.

        The series_id and key arguments are only necessary if you are doing a
        multi write, in which case those arguments can be used to specify which
        series the DataPoint belongs to.

        If needed, the tz argument should be an Olsen database compliant string
        specifying the time zone for this DataPoint.  This argument is most
        often used internally when reading data from TempoDB.

        :param time: the point in time for this reading
        :type time: ISO8601 string or Datetime
        :param value: the value for this reading
        :type value: int or float
        :param string series_id: (optional) a series ID for this point
        :param string key: (optional) a key for this point
        :param string tz: (optional) a timezone for this point
        :rtype: :class:`DataPoint`"""

        t = check_time_param(time)
        if type(value) in [float, int]:
            v = value
        else:
            raise ValueError('Values must be int or float. Got "%s".' %
                             str(value))

        j = {
            't': t,
            'v': v,
            'id': series_id,
            'key': key
        }
        return DataPoint(j, None, tz=tz)