Developer API¶
The classes and functions documented here will be of use to developers who wish to create their own custom ASDF types and extensions.
asdf.types Module¶
Functions¶
|
Format a YAML tag. |
Classes¶
Base class for all user-defined types. |
Class Inheritance Diagram¶
asdf.extension Package¶
Support for plugins that extend asdf to serialize additional custom types.
Functions¶
|
Get a previously created ExtensionManager for the specified extensions, or create and cache one if necessary. |
Get the resolver that includes mappings from all installed extensions. |
|
|
Get a previously created AsdfExtensionList for the specified extensions, or create and cache one if necessary. |
Classes¶
Abstract base class defining an extension to ASDF. |
|
|
Proxy that wraps an extension, provides default implementations of optional methods, and carries additional information on the package that provided the extension. |
|
Extension implementation that reads the extension URI, ASDF Standard requirement, and tag list from a manifest document. |
|
Wraps a list of extensions and indexes their converters by tag and by Python type. |
|
Container for properties of a custom YAML tag. |
Abstract base class for plugins that convert nodes from the parsed YAML tree into custom objects, and vice versa. |
|
|
Proxy that wraps a |
Abstract base class for plugins that compress binary data. |
|
Abstract base class defining a (legacy) extension to ASDF. |
|
|
Manage a set of extensions that are in effect. |
This is the "extension" to ASDF that includes all the built-in tags. |
Class Inheritance Diagram¶
asdf.resource Module¶
Support for plugins that provide access to resources such as schemas.
Functions¶
Get the resource mapping instances for the core schemas. |
Classes¶
|
Wrapper around a resource mapping that carries additional information on the package that provided the mapping. |
|
Resource mapping that reads resource content from a directory or directory tree. |
|
Wraps multiple resource mappings into a single interface with some friendlier error handling. |
Resource mapping that fetches metaschemas from the jsonschema package. |
Class Inheritance Diagram¶
asdf.yamlutil Module¶
Functions¶
|
Convert a tree, possibly containing custom data types that aren't directly representable in YAML, to a tree of basic data types, annotated with tags. |
|
Convert a tree containing only basic data types, annotated with tags, to a tree containing custom data types. |
asdf.util Module¶
Functions¶
|
Formats a list for human readability. |
|
For a given Numpy array, finds the base array that "owns" the actual data. |
|
For a given URI, return the part without any fragment. |
|
For a given local file path, return a file:// url. |
|
Returns all subclasses of a class. |
|
Calculates the amount of extra space to add to a block given the user's request for the amount of extra space. |
|
Resolve a name like |
|
Determine if a value is an instance of a "primitive" type. |
|
Determine if a URI matches a URI pattern with possible wildcards. |
|
Given a class or instance of a class, returns a string representing the fully specified path of the class. |
asdf.versioning Module¶
This module deals with things that change between different versions of the ASDF spec.
Functions¶
|
Split a tag into its base and version. |
|
Join the root and version of a tag back together. |
Classes¶
|
This class adds features to the existing |
|
Class Inheritance Diagram¶
asdf.tests.helpers Module¶
Functions¶
|
|
|
Assert that two ASDF trees match. |
|
Assert that a given tree saves to ASDF and, when loaded back, the tree matches the original tree. |
|
Given a string of YAML content, adds the extra pre- and post-amble to make it an ASDF file. |
|
Get the file sizes in a directory. |
|
Return a string that displays a list of unexpected warnings |