CustomType¶
- class asdf.types.CustomType[source]¶
Bases:
ExtensionType
Base class for all user-defined types.
Attributes Summary
bool
: Indicates whether dynamically generated subclasses can be serializedbool
: Indicates whether modules specified byrequires
are available.str
orlist
: The name of the type.str
: The organization responsible for the type.list
: Python packages that are required to instantiate the object.str
: The standard the type is defined in.set
: Versions that explicitly compatible with this extension class.list
: List of types that this extension class can convert to/from YAML.dict
: Mapping JSON Schema keywords to validation functions for jsonschema.str
,tuple
,asdf.versioning.AsdfVersion
, orasdf.versioning.AsdfSpec
:str
: The YAML tag to use for the type.Attributes Documentation
- handle_dynamic_subclasses = False¶
bool
: Indicates whether dynamically generated subclasses can be serializedFlag indicating whether this type is capable of serializing subclasses of any of the types listed in
types
that are generated dynamically.
- has_required_modules = True¶
bool
: Indicates whether modules specified byrequires
are available.NOTE: This value is automatically generated. Do not set it in subclasses as it will be overwritten.
- name = None¶
str
orlist
: The name of the type.
- organization = 'stsci.edu'¶
str
: The organization responsible for the type.
- requires = []¶
list
: Python packages that are required to instantiate the object.
- standard = 'asdf'¶
str
: The standard the type is defined in.
- 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.
- validators = {}¶
dict
: Mapping JSON Schema keywords to validation functions for jsonschema.Useful if the type defines extra types of validation that can be performed.
- version = AsdfVersion('1.0.0')¶
str
,tuple
,asdf.versioning.AsdfVersion
, orasdf.versioning.AsdfSpec
:The version of the type.
- yaml_tag = None¶
str
: The YAML tag to use for the type.If not provided, it will be automatically generated from name, organization, standard and version.