/xsdata

Naive XML Bindings for python

Primary LanguagePythonMIT LicenseMIT

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

Naive XML Bindings for python

https://travis-ci.com/tefra/xsdata.svg?branch=master https://readthedocs.org/projects/xsdata/badge https://www.codefactor.io/repository/github/tefra/xsdata/badge

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

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

Changelog: 20.5 (2020-05-02)

  • Updated codegen cli to accept multiple definitions or directories as argument.
  • Update ClassBuilder to recursively search for anonymous types.
  • Updated XmlParser to be thread-safe.
  • Added performance tweaks on XmlParser.
  • Added parser config to fail or not on unknown properties.
  • Fixed primitive types being marked as forward references.
  • Fixed nested restrictions on xs:simpleType.
  • Fixed ClassAnalyzer to recover/ignore missing types.