https://github.com/tefra/xsdata/raw/master/docs/_static/logo.png

Naive XML Bindings for python

https://travis-ci.org/tefra/xsdata.svg?branch=master https://readthedocs.org/projects/xsdata/badge https://codecov.io/gh/tefra/xsdata/branch/master/graph/badge.svg https://img.shields.io/github/languages/top/tefra/xsdata.svg https://api.codacy.com/project/badge/Grade/d2f2190a7d514562be35ab647ef4e101 https://img.shields.io/pypi/pyversions/xsdata.svg https://img.shields.io/pypi/v/xsdata.svg

Features

  • Generate data models from XML Schema 1.0 and 1.1 definitions.

  • Supports qualified/unqualified elements and attributes

  • Supports enumerations and inner classes

  • Flattening strategies to keep the code as simple as possible.

  • Preserve embedded documentation and references

  • Pluggable code writer that supports different formats

  • Output: Python Data Classes

    • PEP8 naming conventions and code output

    • Full support for type hints even with forward references

    • XML Parser & Serializer based on lxml

    • JSON Parser & Serializer

  • Output: PlantUML class diagram


https://github.com/tefra/xsdata/raw/master/docs/_static/demo.gif

Check the documentation test suites or our W3C XML Schema 1.1 test runner and the samples repo for more ✨✨✨

Why naive?

The W3C XML Schema offers so much flexibility and abstraction layers and grammatical rules to support practically any xml document definition.

Integration teams and clients don’t care about any of that, take out abstraction and flexibility and you are left with lean named data structures with typed attributes and a namespace for humans to read!