skillfed

PyXB-X

PyXB-X ("pixbix") is a pure Python package that generates Python source code for classes that correspond to data structures defined by XMLSchema.

pyxb-x v1.2.6.4 349.7K downloads/30d#7,333 on PyPI
Permissive license Apache License 2.0 Active released

What it is and what it does

PyXB-X is a code generator that reads XMLSchema definitions and produces Python classes representing the schema's data structures. It aims to provide a Pythonic interface similar to what a developer would hand-write, with elements and attributes as properties, support for complex content models, and bidirectional XML-to-Python conversion.

The package handles common XMLSchema features including nested choice/sequence/all constructs, cross-namespace dependencies, include and import directives, and simple-type constraints. It's positioned as the Python equivalent of JAXB (Java) and CodeSynthesis XSD (C++), letting developers work with XML data through native Python objects rather than DOM or SAX parsing.

Use it for:

  • Generate type-safe Python classes from an existing XMLSchema to validate and parse XML documents in a structured way
  • Automate creation of XML-based configuration or data files by writing Python objects that serialize back to XML
  • Build web services or APIs that consume/produce XML with schema-enforced structure and type safety
  • Convert legacy XML data formats into Python object hierarchies for easier manipulation and analysis
  • Enforce schema compliance in Python applications by using generated bindings instead of manual XML parsing

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

PyXB-X generates Python classes from XMLSchema definitions, enabling bidirectional conversion between XML documents and Python objects with a Pythonic interface.

Yes, if you work with XMLSchema-defined XML data and want type-safe Python bindings. The package is actively maintained, has no dependencies, low install friction, and carries a permissive license. The recent release and active status suggest ongoing support, though documentation and repository visibility should be verified before committing to a new project.

Install

pyxb-x on PyPI

pip

pip install pyxb-x

uv

uv add pyxb-x

poetry

poetry add pyxb-x

Installing PyXB-X

Before you install

Low install friction with no runtime dependencies; marked active with a recent release 17 days ago.

License in practice

Apache License 2.0 is permissive, allowing commercial and private use with minimal restrictions beyond attribution and liability disclaimers.

Quickstart

pip install pyxb-x

from pyxb import WXML
# Generate bindings from schema: pyxb -u schema.xsd -m myschema
# Then use generated module to parse/create XML documents

Requires XMLSchema file to generate bindings; generated code must be created via command-line tool before runtime use.

Verify before relying

  • Whether the package supports Python versions beyond 3.8 despite classifiers listing only up to 3.8
  • Current state of the SourceForge repository and whether active development continues beyond the recent PyPI release

Package facts

License Apache License 2.0 (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance actively maintained — 17 days since the last release
First released
Downloads 349,661/month — #7,333 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: pyxb_x-1.2.6.4-py3-none-any.whl

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseProgramming Language :: Python :: 2Programming Language :: Python :: 2.6Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Topic :: Software Development :: Code GeneratorsTopic :: Text Processing :: Markup :: XML

Tags

xmlschema to python code generatorxml schema binding pythonxsd to python classesxml data structure bindingschema-driven python code generationxml document to python objectpythonic xml bindings
code-generationxml-schemadata-binding

More Code Generators packages