Skip to main content

Python XML Binding

Project description

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://codecov.io/gh/tefra/xsdata/branch/master/graph/badge.svg https://img.shields.io/github/languages/top/tefra/xsdata.svg https://www.codefactor.io/repository/github/tefra/xsdata/badge https://img.shields.io/pypi/pyversions/xsdata.svg https://img.shields.io/pypi/v/xsdata.svg

xsData is a complete XML data binding library for python allowing developers to access and use XML documents as simple objects rather than using DOM.

It ships with a code generator for XML Schema definitions and WSDL 1.1 with SOAP 1.1 bindings. It produces simple dataclasses with type hints that don’t depend on the library itself in order to reduce the learning curve for users that have to write the binding models manually.

The included parser is highly optimized and adaptable with 4 available handlers based on native python and lxml. The parser configuration offers the ability to skip unknown properties and to process xinclude statements.

The parser and serializer are constantly tested against the W3C XML Schema 1.1 test suite and passes more than 99% of the valid instance cases.

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

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

Features

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

  • Generate data models for WSDL 1.1 and SOAP 1.1 bindings.

  • Support qualified elements/attributes, enumerations and inner classes.

  • Preserve embedded documentation and references.

  • Data biding for XML and JSON documents.

  • Pluggable code writer that supports python dataclasses and PlantUML class diagrams.

Changelog: 20.9 (2020-09-03)

  • Added field metadata key tokens for xs:list or xs:NMTOKENS derived elements.

  • Added datatype factory to register custom converters.

  • Added XmlHandler interface to decouple parsing from lxml.

  • Added lxml based content handlers: LxmlEventHandler, LxmlSaxHandler

  • Added native python xml content handlers: XmlEventHandler, XmlSaxHandler

  • Added support for python >= 3.6 #241

  • Added codegen for soap 1.1 fault messages.

  • Fixed converting to enum members derived from xs:NMTOKENS.

  • Fixed package level import naming conflicts. #228

  • Fixed xml serializing to allow empty strings in attribute values. #230

  • Fixed xml serializing for mixed content with non generics. #238

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xsdata-20.9.tar.gz (729.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

xsdata-20.9-py3-none-any.whl (100.1 kB view details)

Uploaded Python 3

File details

Details for the file xsdata-20.9.tar.gz.

File metadata

  • Download URL: xsdata-20.9.tar.gz
  • Upload date:
  • Size: 729.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.4

File hashes

Hashes for xsdata-20.9.tar.gz
Algorithm Hash digest
SHA256 058475cf96ea63497e7407445aeb38348f81e3aa249b6b362f29050e93af0aa3
MD5 b33908bec594110b1dc9681affd4e599
BLAKE2b-256 5fdaaace43e7fb29f8d0ca46fd36d67be8aa41333cab47ee39cc482eb924c546

See more details on using hashes here.

File details

Details for the file xsdata-20.9-py3-none-any.whl.

File metadata

  • Download URL: xsdata-20.9-py3-none-any.whl
  • Upload date:
  • Size: 100.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.4

File hashes

Hashes for xsdata-20.9-py3-none-any.whl
Algorithm Hash digest
SHA256 1e06ae569719a7c5363eeeba2143b208336f308371645c902d1c438a360af6b5
MD5 35e49b3d8ad8b5f4cbb12376e482eee4
BLAKE2b-256 8ed303cd32820cb93dae3147287023d7c94d0eb1e116696b8a3abaf1c7cfc7ae

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page