Skip to main content

image

Naive XML Bindings for python

image image image image image image


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

The code generator supports XML schemas, DTD, WSDL definitions, XML & JSON documents. It produces simple dataclasses with type hints and simple binding metadata.

The included XML and JSON parser/serializer are highly optimized and adaptable, with multiple handlers and configuration properties.

xsData is constantly tested against the W3C XML Schema 1.1 test suite.

Getting started

$ # Install all dependencies
$ pip install xsdata[cli,lxml,soap]
$ # Generate models
$ xsdata generate tests/fixtures/primer/order.xsd --package tests.fixtures.primer
>>> from tests.fixtures.primer import PurchaseOrder
>>> from xsdata.formats.dataclass.parsers import XmlParser
>>>
>>> parser = XmlParser()
>>> order = parser.parse("tests/fixtures/primer/sample.xml", PurchaseOrder)
>>> order.bill_to
Usaddress(name='Robert Smith', street='8 Oak Avenue', city='Old Town', state='PA', zip=Decimal('95819'), country='US')

Check the documentation for more ✨✨✨

Features

Code Generator

  • XML Schemas 1.0 & 1.1
  • WSDL 1.1 definitions with SOAP 1.1 bindings
  • DTD external definitions
  • Directly from XML and JSON Documents
  • Extensive configuration to customize output
  • Pluggable code writer for custom output formats

Default Output

  • Pure python dataclasses with metadata
  • Type hints with support for forward references and unions
  • Enumerations and inner classes
  • Support namespace qualified elements and attributes

Data Binding

  • XML and JSON parser, serializer
  • PyCode serializer
  • Handlers and Writers based on lxml and native xml python
  • Support wildcard elements and attributes
  • Support xinclude statements and unknown properties
  • Customize behaviour through config

Changelog: 26.10 (2026-10-16)

Security

  • Disable external entity resolution in LxmlEventHandler by default (#1228)

Fixes

  • Fix wrapper binding when collection item element name is reused (#1224)
  • Fix KeyError in is_binding_model when models_package is not set (#1219)
  • Validate calendar date in XmlDate.from_string (#1227)
  • Add charset to the SOAP client content-type header (#1231)
  • Skip xsi:nil for a present instance of a type without content (#1234)
  • Skip None text when binding wildcard list elements (#1237)

Features

  • Share compiled jinja templates across generators (#1235)
  • Add third-party license notices for bundled schemas and graphs util (#1238)

Metadata

Release files for xsdata 26.10

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for xsdata 26.10
File Size Uploaded
xsdata-26.10.tar.gz 356.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for xsdata 26.10
File Interpreter ABI Platform
xsdata-26.10-py3-none-any.whl Python 3 none any Details

Total release size: 599.0 kB

Release files / xsdata-26.10.tar.gz

Download URL xsdata-26.10.tar.gz
Size 356.0 kB
Tags Source
SHA-256 checksum
How to use checksums
4bc944d9fa3955f84ecebb83c677e2f681687c002a777731a21104e8360a7522
BLAKE2b-256 checksum
How to use checksums
f3b87b301b80494a750dba431d3d0a800e0e80c91903e8891eef78ead8f95120
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.

Transparency log

Release files / xsdata-26.10-py3-none-any.whl

Download URL xsdata-26.10-py3-none-any.whl
Size 243.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
37a697d60db1396a0431750486744a7e0491fd60669751d95e3ede08f034e0c6
BLAKE2b-256 checksum
How to use checksums
07fe5a9698cef0850317de2a8f3c50519fbaa2cc4225d15bcfe9922e4dff8380
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

26.10 This release

2 release files

26.2

2 release files

26.1

2 release files

25.7

2 release files

25.4

2 release files

24.12

2 release files

24.11

2 release files

24.9

2 release files

24.7

2 release files

24.6.1

2 release files

24.6

2 release files

24.5

2 release files

24.4

2 release files

24.3.1

2 release files

24.3

2 release files

24.2.1

2 release files

24.2

2 release files

24.1

2 release files

23.8

2 release files

23.7

2 release files

23.6

2 release files

23.5

2 release files

22.12

2 release files

22.11

2 release files

22.9

2 release files

22.8

2 release files

22.7

2 release files

22.5

2 release files

22.4

2 release files

22.3

2 release files

22.2

2 release files

22.1

2 release files

21.12

2 release files

21.11

2 release files

21.9

2 release files

21.8

2 release files

21.7

2 release files

21.6

2 release files

21.5

2 release files

21.4

2 release files

21.3

2 release files

21.2

2 release files

21.1

2 release files

20.12

2 release files

20.11

2 release files

20.10

2 release files

20.9

2 release files

20.8

2 release files

20.7

2 release files

20.6

2 release files

20.5.5

2 release files

20.5.4

2 release files

20.5.2

2 release files

20.5.1

2 release files

20.5

2 release files

20.4.2

2 release files

20.4.1

2 release files

20.4

2 release files

20.3

2 release files

20.2

2 release files

20.1.3

2 release files

20.1.2

2 release files

20.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page