Generator ConfigΒΆ

The configuration offers more advance options to further tail the output to your needs, like naming conventions and aliases.

<?xml version="1.0" encoding="UTF-8"?>
<Config xmlns="http://pypi.org/project/xsdata" version="21.9">
  <Output maxLineLength="79">
    <Package>generated</Package>
    <Format repr="true" eq="true" order="false" unsafeHash="false" frozen="false" slots="false" kwOnly="false">dataclasses</Format>
    <Structure>filenames</Structure>
    <DocstringStyle>reStructuredText</DocstringStyle>
    <RelativeImports>false</RelativeImports>
    <CompoundFields>false</CompoundFields>
  </Output>
  <Conventions>
    <ClassName case="pascalCase" safePrefix="type"/>
    <FieldName case="snakeCase" safePrefix="value"/>
    <ConstantName case="screamingSnakeCase" safePrefix="value"/>
    <ModuleName case="snakeCase" safePrefix="mod"/>
    <PackageName case="snakeCase" safePrefix="pkg"/>
  </Conventions>
  <Aliases>
    <ClassName source="fooType" target="Foo"/>
    <ClassName source="ABCSomething" target="ABCSomething"/>
    <FieldName source="ChangeofGauge" target="change_of_gauge"/>
    <PackageName source="http://www.w3.org/1999/xhtml" target="xtml"/>
    <ModuleName source="2010.1" target="2020a"/>
  </Aliases>
</Config>

GeneratorConfig

Generator configuration binding model.

GeneratorOutput

Main generator output options.

OutputFormat

Output format options.

GeneratorConventions

Generator global naming conventions.

GeneratorAliases

Generator aliases for classes, fields, packages and modules that bypass the global naming conventions.

StructureStyle

Code writer output structure strategies.

DocstringStyle

Code writer docstring styles.

GeneratorAlias

Define an alias for a module, package, class and field Alias definition model.

NameConvention

Name convention model.

NameCase

Code writer naming schemes.