Skip to main content

pyxjustiz

PyPI version Python versions License Build Status

pyxjustiz provides Python dataclasses for XJustiz XML messages, automatically generated from the official XSD schemas. It simplifies working with the complex XJustiz standard by providing a type-safe way to parse, validate, and generate compliant XML messages.


🌟 Overview

Working with the XJustiz standard can be challenging due to its complexity and the sheer volume of message types. pyxjustiz bridges this gap by offering a comprehensive set of Python dataclasses generated using xsdata.

With pyxjustiz, you get:

  • Full IDE Support: Enjoy autocompletion and type checking for all XJustiz message types.
  • Type Safety: Avoid manual XML manipulation and catch errors early in the development process.
  • Ease of Use: Focus on your business logic instead of worrying about the underlying XML structure.

✨ Features

  • XJustiz 3.6.0: Currently supports the latest stable version of the XJustiz standard.
  • Automatic Model Generation: Dataclasses are generated directly from the official XSD schemas.
  • Seamless Integration: Designed to work perfectly with the xsdata parser and serializer.
  • Clean API: Provides a natural and intuitive way to handle complex legal data structures in Python.

🚀 Installation

You can install pyxjustiz using pip:

pip install pyxjustiz

Or using uv:

uv add pyxjustiz

📖 Usage

Using pyxjustiz to handle XJustiz messages is straightforward. Here are examples of parsing and serialization.

Parsing an XJustiz Message

from xsdata.formats.dataclass.parsers import XmlParser
from xjustiz.model_gen import NachrichtReg0400003

# Initialize the XML parser
parser = XmlParser()

# Load and parse an XJustiz XML file
# For example, a Handelsregister message (NachrichtReg0400003)
message = parser.from_path("YY-XYZ_HRB_12345+SI-200109111234.xml", NachrichtReg0400003)

# Access data using native Python attributes
print(f"Successfully parsed message: {message}")

Serializing back to XML

from xsdata.formats.dataclass.serializers import XmlSerializer
from xsdata.formats.dataclass.serializers.config import SerializerConfig

# Configure the serializer for pretty-printed output
config = SerializerConfig(pretty_print=True)
serializer = XmlSerializer(config=config)

# Render the dataclass back into an XML string
xml_output = serializer.render(message)

🛠 Maintenance & Updates

The XJustiz standard is updated periodically (see the official release cycle). To update the models in this library when a new version is released:

  1. Place the new XSD files into the xsd/ directory.
  2. Run the generation script:
    bash model_gen.sh
    

Metadata

Release files for pyxjustiz 1.1.0

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

Source distribution (sdist)

Source distribution for pyxjustiz 1.1.0
File Size Uploaded
pyxjustiz-1.1.0.tar.gz 297.1 kB Details

Built distribution (wheel)

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

Total release size: 649.6 kB

Release files / pyxjustiz-1.1.0.tar.gz

Download URL pyxjustiz-1.1.0.tar.gz
Size 297.1 kB
Tags Source
SHA-256 checksum
How to use checksums
3d1f8667f67236e0088976554ad74561eecd2bce34bfe58b7e119e9d4d6ff6c8
BLAKE2b-256 checksum
How to use checksums
61921f5b994c122fdb91fae48453446cb3f903fc7ec900ecb4a442e6896cbfde
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Jan 21, 2026.

Transparency log

Release files / pyxjustiz-1.1.0-py3-none-any.whl

Download URL pyxjustiz-1.1.0-py3-none-any.whl
Size 352.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c73a4816ace05c1c948e425a26aa6b15018aba72b806cb0506405ed69e88c76e
BLAKE2b-256 checksum
How to use checksums
34ca239c4952cb0ad3019159c9c64f36c57fc96802d015ed969665e3c99e3524
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Jan 21, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

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