Skip to content
ASDF Projects Tutorials Community
Back to top
View this page

# load

asdf.load(fp, *, uri=None, validate_checksums=False, extensions=None, custom_schema=None)

  Load the ASDF tree from a file-like object.

  Parameters:
    fp str or file-like object

      A file-like object to read the ASDF data from.

    uri str, optional

      The URI for this ASDF file. Used to resolve relative references against. If not provided, will be automatically determined from the associated file object, if possible and if created from `asdf.open`.

    validate_checksums bool, optional

      If `True`, validate the blocks against their checksums.

    extensions object, optional

      Additional extensions to use when reading and writing the file. May be an `asdf.extension.Extension` or a `list` of extensions.

    custom_schema str, optional

      Path to a custom schema file that will be used for a secondary validation pass. This can be used to ensure that particular ASDF files follow custom conventions beyond those enforced by the specification.

  Returns:
    object:

      The ASDF tree.