# CustomType¶

class asdf.CustomType[source]

Bases: asdf.asdftypes.ExtensionType

Base class for all user-defined types.

Attributes Summary

 has_required_modules bool: Indicates whether modules specified by requires are available. supported_versions set: Versions that explicitly compatible with this extension class. types list: List of types that this extension class can convert to/from YAML. version str, tuple, AsdfVersion, or AsdfSpec: The version of the type.

Attributes Documentation

has_required_modules = True

bool: Indicates whether modules specified by requires are available.

NOTE: This value is automatically generated. Do not set it in subclasses as it will be overwritten.

supported_versions = []

set: Versions that explicitly compatible with this extension class.

If provided, indicates explicit compatibility with the given set of versions. Other versions of the same schema that are not included in this set will not be converted to custom types with this class.

types = []

list: List of types that this extension class can convert to/from YAML.

Custom Python types that, when found in the tree, will be converted into basic types for YAML output. Can be either strings referring to the types or the types themselves.

version = Version('1.0.0')

str, tuple, AsdfVersion, or AsdfSpec: The version of the type.