load

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

Load the ASDF tree from a file-like object.

Parameters:
fpstr or file-like object

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

uristr, 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_checksumsbool, optional

If True, validate the blocks against their checksums.

extensionsobject, optional

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

custom_schemastr, 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.