Getting started¶
Prerequisites¶
Make sure you have python >= 3.7 and pip up and running.
$ python --version
Python 3.7.3
$ pip --version
pip 20.2 from /home/docs/checkouts/readthedocs.org/user_builds/xsdata/envs/v20.7/lib/python3.7/site-packages/pip (python 3.7)
Install xsData¶
Install xsData package using pip.
pip install xsdata
Verify installation using the cli entry point.
$ xsdata --help
Usage: xsdata [OPTIONS] SOURCE
Convert schema definitions to code.
SOURCE can be either a filepath, directory or url
Options:
--package TEXT Target Package [required]
--output [pydata|plantuml] Output Format
--print Print output
--version Show the version and exit.
-v, --verbosity LVL Either CRITICAL, ERROR, WARNING, INFO or DEBUG
--help Show this message and exit.
xsData relies on these awesome libraries
lxml - XML parsing
click - CLI entry point
toposort - Resolve class ordering
jinja2 - Code generation
docformatter - Code formatting