asdf-standard is a Python package that provides the schemas and specification for the Advanced Scientific Data Format (ASDF). It defines the structure and requirements for creating, editing, and reading ASDF files. The package itself primarily distributes YAML schema files; the actual Python implementation for interacting with ASDF files is provided by the separate 'asdf' library. It is currently at version 1.5.0 and releases are made as the ASDF standard evolves.
pip install asdf-standardVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to programmatically locate and load a core ASDF schema file provided by the `asdf-standard` package using `importlib.resources`. This package is primarily a source of schema definitions, which are consumed by the `asdf` library for validation and serialization, rather than directly by end-user applications.
Upgrade your Python environment to 3.10 or higher. For earlier Python versions, use `asdf-standard<1.5.0`.
When referencing schemas or tags, update URIs from `http://stsci.edu/schemas/asdf/...` to `asdf://asdf-format.org/...`. The `asdf` Python library is designed to handle this change gracefully for reading older files, but new schemas or extensions should use the new URI format.
If you intend to work with ASDF files (e.g., create, read, write, validate), you should install and use the `asdf` library (`pip install asdf`). Use `asdf-standard` if you are developing against the ASDF specification or creating custom extensions that rely on its schemas.
Install the `asdf` library: `pip install asdf`.
Use `importlib.resources.files('asdf_standard.schemas.stsci.edu.asdf') / 'core-1.6.0.yaml'` (or similar for other schemas) to reliably locate schema files within the installed package. Ensure the schema version and filename are correct.