xsdata.codegen.writer module¶
-
class
xsdata.codegen.writer.
CodeWriter
(generators=<factory>)[source]¶ Bases:
object
Proxy to format generators and files structure creation.
- Parameters
generators (
Dict
[str
,AbstractGenerator
]) –
-
register_format
(name, generator)[source]¶ Register a new generator by name.
- Parameters
name (
str
) –generator (
AbstractGenerator
) –
-
write
(classes, output)[source]¶ Iterate over the designated generator outputs and create the necessary directories and files.
-
print
(classes, output)[source]¶ Iterate over the designated generator outputs and print them to the console.
-
designate
(classes, output)[source]¶ Normalize the target package and module names by the given output generator.