dt = yaml.load(
    """dt: !!python/object/apply:apply
    - !!python/object/apply:getattr
        - !!python/name:datetime.datetime
        - now
    - []
"""
    )
How to create a datetime object with PyYAML