Registry / data / asdf-standard

asdf-standard

JSON →
library1.5.0pypypi✓ verified 85d ago

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-standard
INSTALL
IMPORT
SIG · ASDF-STANDARD
A
asdf-standard
datapythonv1.5.0
Install
1.5s avg
Import
47ms
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.5.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.920 runs
installs and imports cleanly · install 0.0s · import 0.049s · 18.4MB
glibc
py 3.103.920 runs
installs and imports cleanly · install 1.5s · import 0.044s · 19MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

files
import importlib.resources as resources # To access schema data files
asdf-standard primarily provides data (schema files); direct Python API imports for general use are not common. Schemas are typically accessed as package resources or via the 'asdf' library's schema resolver.

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.

import importlib.resources as resources import yaml # Asdf-standard provides schemas as data files. # This example shows how to locate and load a core schema. try: # For Python 3.9+ (or importlib_resources backport) schema_path = resources.files('asdf_standard.schemas.stsci.edu.asdf') / 'core-1.6.0.yaml' with open(schema_path, 'r') as f: core_schema = yaml.safe_load(f) print("Successfully loaded core-1.6.0.yaml schema.") except Exception as e: print(f"Could not load schema: {e}") print("This might happen if the path or filename is incorrect, or if `asdf` library is expected for schema access.") # In typical usage, the 'asdf' library internally manages these schemas. # For example, to validate an ASDF tree against schemas, you'd use the 'asdf' library: # import asdf # with asdf.open('my_file.asdf') as af: # # Validation happens automatically on open and write # pass
Debug
Known issues
breakingStarting with `asdf-standard` version 1.5.0, Python 3.9 is no longer supported. Ensure your environment uses Python 3.10 or newer.
fix
Upgrade your Python environment to 3.10 or higher. For earlier Python versions, use `asdf-standard<1.5.0`.
affects: >=1.5.0
breakingThe URI authority for ASDF Standard schemas has changed from `stsci.edu` to `asdf-format.org` in ASDF Standard 1.5. This affects the `id` field within schema files and tag URIs.
fix
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.
affects: >=1.5.0
gotchaIt is a common misconception that `asdf-standard` is the primary library for creating and reading ASDF files. `asdf-standard` provides the schema *definitions*, while the `asdf` library provides the Python *implementation* to interact with ASDF files.
fix
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.
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'asdf'
Attempting to import `asdf` functionality without installing the correct package. `asdf-standard` does not include the `asdf` library itself.
fix
Install the `asdf` library: `pip install asdf`.
asdf_standard.schemas.stsci.edu.asdf.core-1.6.0.yaml is not found or cannot be opened
Incorrect path or access method when trying to load a schema file directly from the `asdf-standard` package. The internal layout of package resources can change, or the method used to access them might be incorrect.
fix
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.
Upgrade
Version history
1.5.0latest on PyPI · released Feb 5, 2026
Audit
Dependencies
jsonschemarequiredUsed by the 'asdf' library for validation against the provided schemas.
pyyamlrequiredSchemas are YAML files; used by schema loaders (e.g., in 'asdf' library) to parse schema definitions.
Agent activity
35 hits · last 30 days
node
30
OpenAI (training)
1
Resources