otx.api.serialization.datetime_mapper#

This module contains the mapper for datetime.

Classes

DatetimeMapper()

This class maps a datetime.datetime entity to a string, and vice versa.

class otx.api.serialization.datetime_mapper.DatetimeMapper[source]#

Bases: object

This class maps a datetime.datetime entity to a string, and vice versa.

static backward(instance: None | str) datetime[source]#

Deserializes datetime from str or create new one if it is None.

static forward(instance: datetime) str[source]#

Serializes datetime to str.