'Takes a value from MySQLdb, and converts it to a value that\'s safe for
JSON/Google cloud storage/BigQuery. Dates are converted to UTC seconds.
Decimals are converted to floats.'

@classmethod
def convert_types(cls, value):

    if (type(value) in (datetime, date)):
        return time.mktime(value.timetuple())
    elif isinstance(value, Decimal):
        return float(value)
    else:
        return value
