caikit.core.data_model.timestamp

This module holds common utilities for managing timestamps in protobufs

Attributes

log

error

TIMESTAMP_PROTOBUF_NAME

Functions

datetime_to_proto(...)

Builds a google.protobuf.timestamp_pb2.Timestamp out of the provided datetime.datetime

proto_to_datetime(→ datetime.datetime)

Builds a datetime.datetime out of the provided google.protobuf.timestamp_pb2.Timestamp

Module Contents

caikit.core.data_model.timestamp.log[source]
caikit.core.data_model.timestamp.error
caikit.core.data_model.timestamp.TIMESTAMP_PROTOBUF_NAME = 'google.protobuf.Timestamp'
caikit.core.data_model.timestamp.datetime_to_proto(datetime_: datetime.datetime) google.protobuf.timestamp_pb2.Timestamp[source]

Builds a google.protobuf.timestamp_pb2.Timestamp out of the provided datetime.datetime

caikit.core.data_model.timestamp.proto_to_datetime(time_pb2: google.protobuf.timestamp_pb2.Timestamp) datetime.datetime[source]

Builds a datetime.datetime out of the provided google.protobuf.timestamp_pb2.Timestamp