Hide navigation sidebar
Hide table of contents sidebar
Skip to content
ASDF Projects Tutorials Community
Back to top
View this page
Toggle table of contents sidebar

# yaml_to_asdf

asdf.testing.helpers.yaml_to_asdf(yaml_content, version=None)

  Given a string of YAML content, adds the extra pre- and post-amble to make it an ASDF file.

  Parameters:
    yaml_content string or bytes

      YAML content.

    version str or None.

      ASDF Standard version. If None, use the library’s default version.

  Returns:
    io.BytesIO

      A file-like object containing the ASDF file.