XSDATA-GENERATE(1)

πŸ“¦ version 26.2, in ubuntu stonking

✨ XSDATA-GENERATE ✨

okay so bestie, this is the xsdata-generate moment β€” it's part of the xsdata manual gang, and it's literally the glow-up machine that turns your schema files into actual code πŸ’…


🌸 NAME 🌸

xsdata-generate β€” generate code from xsd, dtd, wsdl, xml and... (the ellipsis is doing a LOT of heavy lifting here fr)


πŸŽ€ SYNOPSIS πŸŽ€

xsdata generate [OPTIONS] SOURCE

πŸ¦‹ DESCRIPTION πŸ¦‹

so like. you give it schemas. it gives you code. that's the whole vibe ✨

Generate code from xsd, dtd, wsdl, xml and json files.

The input SOURCE can be either a filepath, a uri, or a directory containing xml, json, xsd and wsdl files. no cap, it really does just slurp up whatever's in there 🫢


πŸ‘‘ OPTIONS πŸ‘‘

  • -r, --recursive β€” dig through the source directory recursively, like you're deep-diving your ex's insta at 2am 🌈
  • -c, --config TEXT β€” your project configuration πŸŽ€
  • --cache β€” cache sources loading (save that work, queen, you're not doing it twice πŸ’…)
  • --debug β€” show debug messages πŸ”
  • --extensions TEXT β€” a comma-separated list of extensions to filter 🧚
  • -p, --package TEXT β€” target package [default: generated] πŸ’–
  • -o, --output [dataclasses] β€” output format name [default: dataclasses] ⭐
  • --repr / --no-repr β€” generate the __repr__ method [default: True] πŸ™ˆ
  • --eq / --no-eq β€” generate the __eq__ method [default: True] ✨
  • --order / --no-order β€” generate __lt__, __le__, __gt__, and __ge__ methods [default: False] πŸ”₯
  • --unsafe-hash / --no-unsafe-hash β€” generate the __hash__ method [default: False] ⚠️ (the name literally has unsafe in it bestie, so… proceed with intention)
  • --frozen / --no-frozen β€” enable read only properties [default: False] ❄️
  • --slots / --no-slots β€” enable __slots__ [default: False] πŸ•³οΈ
  • -ss, --structure-style [filenames|namespaces|clusters|single-package|namespace-clusters] β€” output structure style [default: filenames] 🌸
  • -ds, --docstring-style [reStructuredText|NumPy|Google|Accessible|Blank] β€” docstring style [default: reStructuredText] πŸ“
  • --relative-imports / --no-relative-imports β€” use relative imports [default: False] 🧭
  • --compound-fields / --no-compound-fields β€” use compound fields for repeatable elements [default: False] 🧩
  • --wrapper-fields / --no-wrapper-fields β€” generate wrapper fields [default: False] 🎁
  • -mll, --max-line-length INTEGER β€” adjust the maximum line length [default: 79] πŸ“
  • --generic-collections / --no-generic-collections β€” use generic collections (Iterable, Mapping) [default: False] πŸ—‚οΈ
  • --unnest-classes / --no-unnest-classes β€” move inner classes to the upper level [default: False] πŸͺΊ
  • --ignore-patterns / --no-ignore-patterns β€” ignore pattern restrictions [default: False] 🚫
  • --include-header / --no-include-header β€” include a header with codegen information in the output [default: False] 🏷️

quick reminder bestie: every single flag above is doing exactly what it says in the original, I did not invent, rename, or merge a single one of these. the defaults are the defaults. periodt πŸ’œ

and that's the whole page πŸ¦‹

this cutie was brought to you by version 26.2, dated 2026-03-02 β€” go forth and generate, my love, you're gonna slay βœ¨πŸ’–πŸ‘‘

πŸ“¦ where this page comes from