GeneratorExtension#
- class xsdata.models.config.GeneratorExtension(type=None, class_name=None, import_string=None, prepend=False, apply_if_derived=False)[source]#
Generator extension model representation.
Add decorators or base classes on the generated classes that match the class name pattern.
- Parameters:
type (
Optional
[ExtensionType
]) – The extension typeclass_name (
Optional
[str
]) – The class name or a pattern to apply the extensionimport_string (
Optional
[str
]) – The import string of the extension typeprepend (
bool
) – Prepend or append decorator or base classapply_if_derived (
bool
) – Apply or skip if the class is already a subclass
- module_path#
The module path of the base class or the annotation
- func_name#
The annotation or base class name
- pattern#
The compiled search class name pattern
- __post_init__()[source]#
Post initialization method.
Set the module, func_name and pattern instance attributes.
- Raises:
GeneratorConfigError – If the pattern can not be compiled.
- __eq__(other)#
Return self==value.
- __hash__ = None#