예제 #1
0
파일: dates.py 프로젝트: mcouthon/r2k
def arrow_representer(dumper: yaml.Dumper, data: arrow.Arrow) -> str:
    """
    Represent an `arrow.arrow.Arrow` object as a scalar in ISO format.

    ! '2013-05-07T04:24:24+00:00'
    """
    return dumper.represent_scalar("!", data.isoformat("T"))
예제 #2
0
 def transform_python(self, value: arrow.Arrow):
     return value.isoformat()