def convert_types(cls, value):
        """
        Takes a value from Postgres, 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. Times are converted to seconds.
        """
        if type(value) in (datetime.datetime, datetime.date):
            return time.mktime(value.timetuple())
        elif type(value) == datetime.time:
            formated_time = time.strptime(str(value), "%H:%M:%S")
            return datetime.timedelta(
                hours=formated_time.tm_hour,
                minutes=formated_time.tm_min,
                seconds=formated_time.tm_sec).seconds
        elif isinstance(value, Decimal):
            return float(value)
        else:
            return value
def convert_types(cls, value):
        
        if type(value) in (datetime.datetime, datetime.date):
            return time.mktime(value.timetuple())
        elif type(value) == datetime.time:
            formated_time = time.strptime(str(value), "%H:%M:%S")
            return datetime.timedelta(
                hours=formated_time.tm_hour,
                minutes=formated_time.tm_min,
                seconds=formated_time.tm_sec).seconds
        elif isinstance(value, Decimal):
            return float(value)
        else:
            return value
def convert_types ( cls , value ) : if type ( value ) in ( datetime . datetime , datetime . date ) : return time . mktime ( value . timetuple ( ) ) elif type ( value ) == datetime . time : formated_time = time . strptime ( str ( value ) , "%H:%M:%S" ) return datetime . timedelta ( hours = formated_time . tm_hour , minutes = formated_time . tm_min , seconds = formated_time . tm_sec ) . seconds elif isinstance ( value , Decimal ) : return float ( value ) else : return value
Takes a value from Postgres, 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. Times are converted to seconds.
Takes a value from Postgres 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 . Times are converted to seconds .