ExtensionProxy
- class asdf.extension.ExtensionProxy(delegate, package_name=None, package_version=None)[source]
Bases:
Extension
Proxy that wraps an extension, provides default implementations of optional methods, and carries additional information on the package that provided the extension.
Attributes Summary
Get the extension's ASDF Standard requirement.
Get the fully qualified class name of the extension.
Get the extension's compressors.
Get the extension's converters.
Get the wrapped extension instance.
Get the URI of the extension to the ASDF Standard implemented by this class.
False
Get the set of fully-qualified class names used by older versions of this extension.
Get the name of the Python package that provided this extension.
Get the version of the Python package that provided the extension
Get the legacy extension's tag-to-schema-URI mapping.
Get the YAML tags supported by this extension.
Get the legacy extension's ExtensionType subclasses.
Get the legacy extension's schema-URI-to-URL mapping.
Get the
asdf.extension.Validator
instances for additional schema properties supported by this extension.Get a dictionary of custom yaml TAG handles defined by the extension.
Methods Summary
maybe_wrap
(delegate)Attributes Documentation
- asdf_standard_requirement
Get the extension’s ASDF Standard requirement.
- Returns:
- packaging.specifiers.SpecifierSet
- class_name
Get the fully qualified class name of the extension.
- Returns:
- str
- compressors
Get the extension’s compressors.
- Returns:
- list of asdf.extension.Compressor
- converters
Get the extension’s converters.
- Returns:
- list of asdf.extension.Converter
- delegate
Get the wrapped extension instance.
- Returns:
- asdf.extension.Extension
- extension_uri
Get the URI of the extension to the ASDF Standard implemented by this class. Note that this may not uniquely identify the class itself.
- Returns:
- str or None
- legacy
False
- legacy_class_names
Get the set of fully-qualified class names used by older versions of this extension. This allows a new-style implementation of an extension to prevent warnings when a legacy extension is missing.
- Returns:
- set of str
- package_name
Get the name of the Python package that provided this extension.
- Returns:
- str or None
None
if the extension was added at runtime.
- package_version
Get the version of the Python package that provided the extension
- Returns:
- str or None
None
if the extension was added at runtime.
- tag_mapping
Get the legacy extension’s tag-to-schema-URI mapping.
- Returns:
- iterable of tuple or callable
- tags
Get the YAML tags supported by this extension.
- Returns:
- list of asdf.extension.TagDefinition
- types
Get the legacy extension’s ExtensionType subclasses.
- Returns:
- iterable of asdf.type.ExtensionType
- url_mapping
Get the legacy extension’s schema-URI-to-URL mapping.
- Returns:
- iterable of tuple or callable
- validators
Get the
asdf.extension.Validator
instances for additional schema properties supported by this extension.- Returns:
- list of asdf.extension.Validator
- yaml_tag_handles
Get a dictionary of custom yaml TAG handles defined by the extension.
The dictionary key indicates the TAG handles to be placed in the YAML header, the value defines the string for tag replacement. See https://yaml.org/spec/1.1/#tag%20shorthand/
Example:
{"!foo!": "tag:nowhere.org:custom/"}
- Returns:
- dict
Methods Documentation