コード例 #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()